You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(82) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(13) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Simon H. <har...@us...> - 2006-07-13 00:04:29
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/main/net/sf/joodi/plugins/ant</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">JoodiTask.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
</table>
<pre class="comment">
Added option to ant task to prevent failure on notification.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins/ant<br /></span>
<div class="fileheader"><big><b>JoodiTask.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- JoodiTask.java 5 Jan 2005 03:24:18 -0000 1.5
+++ JoodiTask.java 13 Jul 2006 00:04:26 -0000 1.6
@@ -41,13 +41,14 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: JoodiTask.java,v 1.5 2005/01/05 03:24:18 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: JoodiTask.java,v 1.6 2006/07/13 00:04:26 haruki_zaemon Exp $
</pre><pre class="diff" id="context"> */
public class JoodiTask extends Task {
private static final Log LOG = LogFactory.getLog(JoodiTask.class);
private Path _path;
private File _report;
</pre><pre class="diff" id="added">+ private boolean _failOnNotification = true;
</pre><pre class="diff" id="context">
public void setProject(Project project) {
super.setProject(project);
</pre><pre class="diff"><small id="info">@@ -61,6 +62,10 @@
</small></pre><pre class="diff" id="context"> public void addPath(Path path) {
_path.add(path);
}
</pre><pre class="diff" id="added">+
+ public void setFailOnNotification(boolean failOnNotification) {
+ _failOnNotification = failOnNotification;
+ }
</pre><pre class="diff" id="context">
public void execute() throws BuildException {
if (_report == null) {
</pre><pre class="diff"><small id="info">@@ -93,7 +98,7 @@
</small></pre><pre class="diff" id="context">
NotificationListener listener = new NotificationListener();
joodi.runReport(listener);
</pre><pre class="diff" id="removed">- if (listener.hasNotifications()) {
</pre><pre class="diff" id="added">+ if (listener.hasNotifications() && _failOnNotification) {
</pre><pre class="diff" id="context"> throw new BuildException("Inspection finished with " + listener.getNotificationCount() + " notifications.");
}
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2006-07-07 02:51:28
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1">ScalarTypeReference.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file2">ScalarTypeReferenceTest.java</a></tt></td><td align="right" id="added">+9</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td></td><td align="right" id="added">+14</td><td align="right" id="removed">-2</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
fix bug in string representation of ScalarTypeReference
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ScalarTypeReference.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- ScalarTypeReference.java 15 Jan 2005 00:37:04 -0000 1.2
+++ ScalarTypeReference.java 7 Jul 2006 02:51:24 -0000 1.3
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: ScalarTypeReference.java,v 1.<span id="removedchars">2 2005/01/15 00:37:0</span>4 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ScalarTypeReference.java,v 1.<span id="addedchars">3 2006/07/07 02:51:2</span>4 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ScalarTypeReference implements TypeReference {
private final Type _type;
</pre><pre class="diff"><small id="info">@@ -79,4 +79,8 @@
</small></pre><pre class="diff" id="context">
visitor.visit("scalar-reference", _type);
}
</pre><pre class="diff" id="added">+
+ public String toString() {
+ return _type.toString();
+ }
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ScalarTypeReferenceTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- ScalarTypeReferenceTest.java 15 Jan 2005 00:37:09 -0000 1.3
+++ ScalarTypeReferenceTest.java 7 Jul 2006 02:51:24 -0000 1.4
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: ScalarTypeReferenceTest.java,v 1.<span id="removedchars">3 2005/01/15 00:37:09</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ScalarTypeReferenceTest.java,v 1.<span id="addedchars">4 2006/07/07 02:51:24</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ScalarTypeReferenceTest extends TestCase {
private static final DefaultNamespace NAMESPACE = new DefaultNamespace("a.b");
</pre><pre class="diff"><small id="info">@@ -36,6 +36,7 @@
</small></pre><pre class="diff" id="context"> public void testIsAFact() {
assertTrue(Fact.class.isAssignableFrom(ScalarTypeReference.class));
}
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> public void testIsATypeReference() {
assertTrue(TypeReference.class.isAssignableFrom(ScalarTypeReference.class));
}
</pre><pre class="diff"><small id="info">@@ -52,6 +53,13 @@
</small></pre><pre class="diff" id="context"> assertSame(type, reference.getReferencedType());
}
</pre><pre class="diff" id="added">+ public void testToStringReflectsTypePassedInConstructor() {
+ final String typeName = "a.b.c";
+ final SimpleType type = new SimpleType(typeName, NAMESPACE);
+ TypeReference reference = new ScalarTypeReference(type);
+ assertEquals(typeName, reference.toString());
+ }
+
</pre><pre class="diff" id="context"> public void testTwoScalarTypeReferencesToTheSameTypeObjectAreEqual() {
final SimpleType type = new SimpleType("a.b.c", NAMESPACE);
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Simon H. <har...@us...> - 2006-07-07 02:23:23
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/test/net/sf/joodi</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>reporting/<a href="#file1">TransformingReportWriterTest.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt>util/<a href="#file2">LocalEntityResolver.java</a></tt></td><td align="right" id="added">+16</td><td align="right" id="removed">-12</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td></td><td align="right" id="added">+20</td><td align="right" id="removed">-16</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
Fixed entity resolver to work with JDK 1.5 (removal of dependence on crimson).
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/reporting<br /></span>
<div class="fileheader"><big><b>TransformingReportWriterTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- TransformingReportWriterTest.java 24 Dec 2004 22:45:20 -0000 1.4
+++ TransformingReportWriterTest.java 7 Jul 2006 02:23:18 -0000 1.5
@@ -24,23 +24,23 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.reporting;
</pre><pre class="diff" id="removed">-import junit.framework.TestCase;
</pre><pre class="diff" id="context"> import junit.framework.AssertionFailedError;
</pre><pre class="diff" id="added">+import junit.framework.TestCase;
</pre><pre class="diff" id="context"> import net.sf.joodi.facts.Fact;
import net.sf.joodi.facts.FactVisitor;
import net.sf.joodi.util.ClassLoaderResourceProvider;
</pre><pre class="diff" id="removed">-import net.sf.joodi.util.ResourceProvider;
</pre><pre class="diff" id="context"> import net.sf.joodi.util.LocalEntityResolver;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.ResourceProvider;
</pre><pre class="diff" id="context"> import org.easymock.MockControl;
</pre><pre class="diff" id="removed">-import javax.xml.parsers.DocumentBuilderFactory;
</pre><pre class="diff" id="context"> import javax.xml.parsers.DocumentBuilder;
</pre><pre class="diff" id="added">+import javax.xml.parsers.DocumentBuilderFactory;
</pre><pre class="diff" id="context"> import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TransformingReportWriterTest.java,v 1.4 2004/12/24 22:45:20 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TransformingReportWriterTest.java,v 1.5 2006/07/07 02:23:18 haruki_zaemon Exp $
</pre><pre class="diff" id="context"> */
public class TransformingReportWriterTest extends TestCase {
private final MockControl _control = MockControl.createStrictControl(ResourceProviderAndReportDestination.class);
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/util<br /></span>
<div class="fileheader"><big><b>LocalEntityResolver.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- LocalEntityResolver.java 24 Dec 2004 22:45:20 -0000 1.1
+++ LocalEntityResolver.java 7 Jul 2006 02:23:19 -0000 1.2
@@ -24,21 +24,28 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.util;
</pre><pre class="diff" id="removed">-import org.apache.crimson.parser.Resolver;
</pre><pre class="diff" id="added">+import org.xml.sax.EntityResolver;
</pre><pre class="diff" id="context"> import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import java.io.IOException;
</pre><pre class="diff" id="added">+import java.util.HashMap;
+import java.util.Map;
</pre><pre class="diff" id="context">
/**
</pre><pre class="diff" id="removed">- * @version $Id: LocalEntityResolver.java,v 1.1 2004/12/24 22:45:20 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: LocalEntityResolver.java,v 1.2 2006/07/07 02:23:19 haruki_zaemon Exp $
</pre><pre class="diff" id="context"> */
</pre><pre class="diff" id="removed">-public class LocalEntityResolver extends Resolver {
- private static final String RESOURCE_INDICATOR = "java:resource:";
</pre><pre class="diff" id="added">+public class LocalEntityResolver implements EntityResolver {
+ private static final Map RESOURCES = new HashMap();
+
+ static {
+ RESOURCES.put("-//W3C//DTD XHTML 1.0 Strict//EN", "/resources/xhtml-strict.dtd");
+ RESOURCES.put("-//W3C//ENTITIES Latin 1 for XHTML//EN", "/resources/xhtml-lat1.ent");
+ RESOURCES.put("-//W3C//ENTITIES Symbols for XHTML//EN", "/resources/xhtml-symbol.ent");
+ RESOURCES.put("-//W3C//ENTITIES Special for XHTML//EN", "/resources/xhtml-special.ent");
+ }
</pre><pre class="diff" id="context">
public LocalEntityResolver() {
</pre><pre class="diff" id="removed">- // XHTML DTD will be cached locally for offline testing
- registerCatalogEntry("-//W3C//DTD XHTML 1.0 Strict//EN", "resources/xhtml-strict.dtd", getClass().getClassLoader());
</pre><pre class="diff" id="context"> }
/**
</pre><pre class="diff"><small id="info">@@ -48,11 +55,8 @@
</small></pre><pre class="diff" id="context"> * as they are being resolved. This just avoids having to register them in
* the constructor.
*/
</pre><pre class="diff" id="removed">- public InputSource resolveEntity(String name, String uri) throws IOException, SAXException {
- if (uri != null && uri.startsWith(RESOURCE_INDICATOR)) {
- String resourceName = uri.substring(RESOURCE_INDICATOR.length());
- registerCatalogEntry(name, resourceName, getClass().getClassLoader());
- }
- return super.resolveEntity(name, uri);
</pre><pre class="diff" id="added">+ public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException {
+ String resource = (String) RESOURCES.get(publicId);
+ return resource != null ? new InputSource(getClass().getResourceAsStream(resource)) : null;
</pre><pre class="diff" id="context"> }
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Simon H. <har...@us...> - 2006-07-07 00:55:57
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/conf</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">checkstyle.xsl</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
</table>
<pre class="comment">
Fixed error applying checkstyle report stylesheet.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/conf<br /></span>
<div class="fileheader"><big><b>checkstyle.xsl</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- checkstyle.xsl 30 Jan 2005 11:22:45 -0000 1.2
+++ checkstyle.xsl 7 Jul 2006 00:55:53 -0000 1.3
@@ -1,6 +1,6 @@
</small></pre><pre class="diff" id="context"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
</pre><pre class="diff" id="removed">- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
</pre><pre class="diff" id="added">+ xmlns:redirect="http://xml.apache.org/xalan/redirect"
</pre><pre class="diff" id="context"> extension-element-prefixes="redirect">
<!--
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2005-01-30 11:22:58
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>conf/<a href="#file1">checkstyle.xsl</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.1.1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt>etc/<a href="#file2">build-index.html</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>test/net/sf/joodi/rules/drools/<a href="#file3">AbstractDroolsTestCase.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt><a href="#file4">build.xml</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.15 -> 1.16</td></tr>
<tr><td></td><td align="right" id="added">+14</td><td align="right" id="removed">-9</td><td></td></tr>
</table>
<small id="info">4 modified files</small><br />
<pre class="comment">
Checkstyle only reports errors and produces reports when a failure occurs
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/conf<br /></span>
<div class="fileheader"><big><b>checkstyle.xsl</b></big> <small id="info">1.1.1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1.1.1 -r1.2
--- checkstyle.xsl 7 Oct 2004 07:19:38 -0000 1.1.1.1
+++ checkstyle.xsl 30 Jan 2005 11:22:45 -0000 1.2
@@ -84,7 +84,7 @@
</small></pre><pre class="diff" id="context"> </redirect:write>
<!-- process all files -->
</pre><pre class="diff" id="removed">- <xsl:apply-templates select="file"/>
</pre><pre class="diff" id="added">+ <xsl:apply-templates select="file<span id="addedchars">[count(error)>0]</span>"/>
</pre><pre class="diff" id="context"> </xsl:template>
<xsl:template name="index.html">
</pre><pre class="diff"><small id="info">@@ -210,7 +210,7 @@
</small></pre><pre class="diff" id="context"> <p>
<table width="100%">
<!-- For each file create its part -->
</pre><pre class="diff" id="removed">- <xsl:apply-templates select="file" mode="all.classes">
</pre><pre class="diff" id="added">+ <xsl:apply-templates select="file<span id="addedchars">[count(error)>0]</span>" mode="all.classes">
</pre><pre class="diff" id="context"> <xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</pre><pre class="diff"><small id="info">@@ -226,7 +226,7 @@
</small></pre><pre class="diff" id="context"> <th>Name</th>
<th>Errors</th>
</tr>
</pre><pre class="diff" id="removed">- <xsl:apply-templates select="file" mode="filelist">
</pre><pre class="diff" id="added">+ <xsl:apply-templates select="file<span id="addedchars">[count(error)>0]</span>" mode="filelist">
</pre><pre class="diff" id="context"> <xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/etc<br /></span>
<div class="fileheader"><big><b>build-index.html</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- build-index.html 30 Nov 2004 11:52:20 -0000 1.1
+++ build-index.html 30 Jan 2005 11:22:46 -0000 1.2
@@ -15,7 +15,8 @@
</small></pre><pre class="diff" id="context"> <div id="links">
<ul>
<li><a href="reports/junit/index.html">Unit Test Results</a></li>
</pre><pre class="diff" id="removed">- <li><a href="reports/checkstyle/index.html">Checkstyle Results</a></li>
</pre><pre class="diff" id="added">+ <li><a href="reports/checkstyle/main/index.html">Checkstyle Main Results</a></li>
+ <li><a href="reports/checkstyle/test/index.html">Checkstyle Test Results</a></li>
</pre><pre class="diff" id="context"> <li><a href="reports/simian/simian-main.html">Simian Code Duplication Results</a></li>
<li><a href="javadoc/index.html">javadoc</a></li>
</ul>
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>AbstractDroolsTestCase.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- AbstractDroolsTestCase.java 14 Dec 2004 06:14:28 -0000 1.2
+++ AbstractDroolsTestCase.java 30 Jan 2005 11:22:46 -0000 1.3
@@ -33,7 +33,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: AbstractDroolsTestCase.java,v 1.2 2004/12/14 06:14:28 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: AbstractDroolsTestCase.java,v 1.3 2005/01/30 11:22:46 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public abstract class AbstractDroolsTestCase extends AbstractRuleTestCase {
private static RuleEngineFactory RULE_ENGINE_FACTORY;
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src<br /></span>
<div class="fileheader"><big><b>build.xml</b></big> <small id="info">1.15 -> 1.16</small></div>
<pre class="diff"><small id="info">diff -u -r1.15 -r1.16
--- build.xml 4 Jan 2005 02:12:27 -0000 1.15
+++ build.xml 30 Jan 2005 11:22:46 -0000 1.16
@@ -1,5 +1,5 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: build.xml,v 1.15 2005/01/04 02:12:27 adammurdoch Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: build.xml,v 1.16 2005/01/30 11:22:46 jimmyjazz Exp $ -->
</pre><pre class="diff" id="context">
<project default="all" name="joodi" basedir=".">
<tstamp/>
</pre><pre class="diff"><small id="info">@@ -93,19 +93,23 @@
</small></pre><pre class="diff" id="context"> </target>
<target name="checkstyle" depends="prepare">
</pre><pre class="diff" id="removed">- <checkstyle config="${src.conf.dir}/checkstyle-main.xml" failOnViolation="true">
</pre><pre class="diff" id="added">+ <checkstyle config="${src.conf.dir}/checkstyle-main.xml" failOnViolation="false" failureproperty="fail.checkstyle.main">
</pre><pre class="diff" id="context"> <fileset dir="${src.main.dir}" includes="**/*.java" excludes="**/extra/**"/>
<formatter type="plain"/>
<formatter type="xml" tofile="${build.reports.checkstyle.dir}/checkstyle-main.xml"/>
</checkstyle>
</pre><pre class="diff" id="removed">- <checkstyle config="${src.conf.dir}/checkstyle-test.xml" failOnViolation="true">
</pre><pre class="diff" id="added">+ <checkstyle config="${src.conf.dir}/checkstyle-test.xml" failOnViolation="false" failureproperty="fail.checkstyle.test">
</pre><pre class="diff" id="context"> <fileset dir="${src.test.dir}" includes="**/*.java"/>
<formatter type="plain"/>
<formatter type="xml" tofile="${build.reports.checkstyle.dir}/checkstyle-test.xml"/>
</checkstyle>
</pre><pre class="diff" id="removed">- <xslt basedir="${build.reports.checkstyle.dir}" destdir="${build.reports.checkstyle.dir}" style="${src.conf.dir}/checkstyle.xsl" includes="checkstyle-*.xml"/>
</pre><pre class="diff" id="added">+ <xslt basedir="${build.reports.checkstyle.dir}" destdir="${build.reports.checkstyle.dir}/main" style="${src.conf.dir}/checkstyle.xsl" includes="checkstyle-main.xml"/>
+ <xslt basedir="${build.reports.checkstyle.dir}" destdir="${build.reports.checkstyle.dir}/test" style="${src.conf.dir}/checkstyle.xsl" includes="checkstyle-test.xml"/>
+
+ <fail if="fail.checkstyle.main" message="Main checkstyle failed. See report."/>
+ <fail if="fail.checkstyle.test" message="Test checkstyle failed. See report."/>
</pre><pre class="diff" id="context"> </target>
<target name="simian" depends="prepare">
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1">AbstractOperationTypeUse.java</a></tt></td><td align="right" id="added">+13</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">ArrayTypeReference.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file3">Constructor.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file4">DirectExtension.java</a></tt></td><td align="right" id="added">+15</td><td align="right" id="removed">-10</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt> /<a href="#file5">Field.java</a></tt></td><td align="right" id="added">+15</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file6">InstantiationTypeUse.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file7">LocalVariable.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file8">Operation.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr><td><tt> /<a href="#file9">ParameterTypeUse.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file10">ReturnTypeUse.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td><tt> /<a href="#file11">ScalarTypeReference.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file12">SimpleType.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr><td><tt> /<a href="#file13">StaticFieldTypeUse.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt> /<a href="#file14">StaticInitialiser.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file15">StaticOperationTypeUse.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt> /<a href="#file16">ThrowableTypeUse.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt> /<a href="#file17">TransitiveTypeUse.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file18">TypeReference.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file19">TypeUse.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt>main/net/sf/joodi/parser/<a href="#file20"><span id="added">DefaultTypeReferenceFactory.java</span></a></tt></td><td align="right" id="added">+86</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file21">ModelBuildingTypeVisitor.java</a></tt></td><td align="right" id="added">+22</td><td align="right" id="removed">-13</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr class="alt"><td><tt> /<a href="#file22">TypeReferenceFactory.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-52</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>main/net/sf/joodi/plugins/<a href="#file23">Joodi.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.10 -> 1.11</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/notification/<a href="#file24">DescendentNamespaceUseNotificationTest.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-7</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>test/net/sf/joodi/facts/<a href="#file25">AbstractTypeTest.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file26">ArrayTypeReferenceTest.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file27">ConstructorTest.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file28">DirectExtensionTest.java</a></tt></td><td align="right" id="added">+12</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1.1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file29">DirectNamespaceUseTest.java</a></tt></td><td align="right" id="added">+9</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file30">DummyTypeUse.java</a></tt></td><td align="right" id="added">+13</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr><td><tt> /<a href="#file31">FieldTest.java</a></tt></td><td align="right" id="added">+16</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file32">Fixtures.java</a></tt></td><td align="right" id="added">+34</td><td align="right" id="removed">-19</td><td nowrap="nowrap" align="center">1.11 -> 1.12</td></tr>
<tr><td><tt> /<a href="#file33">OperationTest.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt> /<a href="#file34">ScalarTypeReferenceTest.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr><td><tt> /<a href="#file35">SimpleTypeTest.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr class="alt"><td><tt> /<a href="#file36">StaticInitialiserTest.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>test/net/sf/joodi/parser/<a href="#file37"><span id="added">DefaultTypeReferenceFactoryTest.java</span></a></tt></td><td align="right" id="added">+118</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file38">ModelBuildingTypeVisitorTest.java</a></tt></td><td align="right" id="added">+137</td><td align="right" id="removed">-103</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr><td><tt> /<a href="#file39"><span id="removed">TypeReferenceFactoryTest.java</span></a></tt></td><td></td><td align="right" id="removed">-118</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td></td><td align="right" id="added">+615</td><td align="right" id="removed">-443</td><td></td></tr>
</table>
<small id="info">2 added + 1 removed + 36 modified, total 39 files</small><br />
<pre class="comment">
Big ass refactoring to introduce one simple concept: that the RHS (target) of a TypeUse is now a TypeReference, not a Type. This allows TypeLibrary to head towards post-load immutability, and leaves it knowing nothing about arrays...
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>AbstractOperationTypeUse.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- AbstractOperationTypeUse.java 8 Dec 2004 06:02:00 -0000 1.4
+++ AbstractOperationTypeUse.java 15 Jan 2005 00:37:03 -0000 1.5
@@ -28,18 +28,18 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: AbstractOperationTypeUse.java,v 1.4 2004/12/08 06:02:00 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: AbstractOperationTypeUse.java,v 1.5 2005/01/15 00:37:03 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public abstract class AbstractOperationTypeUse implements TypeUse {
private final Operation _operation;
</pre><pre class="diff" id="removed">- private final Type _usedType;
</pre><pre class="diff" id="added">+ private final TypeReference _usedTypeReference;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public AbstractOperationTypeUse(Operation operation, Type<span id="removedchars"> usedTyp</span>e) {
</pre><pre class="diff" id="added">+ public AbstractOperationTypeUse(Operation operation, Type<span id="addedchars">Reference usedTypeReferenc</span>e) {
</pre><pre class="diff" id="context"> Assert.isTrue(operation != null, "operation can't be null");
</pre><pre class="diff" id="removed">- Assert.isTrue(usedType != null, "usedType can't be null");
</pre><pre class="diff" id="added">+ Assert.isTrue(usedTypeReference != null, "usedTypeReference can't be null");
</pre><pre class="diff" id="context">
_operation = operation;
</pre><pre class="diff" id="removed">- _usedType = usedType;
</pre><pre class="diff" id="added">+ _usedTypeReference = usedTypeReference;
</pre><pre class="diff" id="context"> }
public Operation getOperation() {
</pre><pre class="diff"><small id="info">@@ -51,18 +51,22 @@
</small></pre><pre class="diff" id="context"> }
public Type getUsedType() {
</pre><pre class="diff" id="removed">- return _usedType;
</pre><pre class="diff" id="added">+ return _usedTypeReference.getReferencedType();
+ }
+
+ public TypeReference getUsedTypeReference() {
+ return _usedTypeReference;
</pre><pre class="diff" id="context"> }
public void accept(FactVisitor visitor) {
Assert.isTrue(visitor != null, "visitor can't be null");
visitor.visit("operation", _operation);
</pre><pre class="diff" id="removed">- visitor.visit("used-type", _usedType);
</pre><pre class="diff" id="added">+ visitor.visit("used-type-reference", _usedTypeReference);
</pre><pre class="diff" id="context"> }
public int hashCode() {
</pre><pre class="diff" id="removed">- return _operation.hashCode() ^ _usedType.hashCode();
</pre><pre class="diff" id="added">+ return _operation.hashCode() ^ _usedType<span id="addedchars">Reference</span>.hashCode();
</pre><pre class="diff" id="context"> }
public boolean equals(Object object) {
</pre><pre class="diff"><small id="info">@@ -76,6 +80,6 @@
</small></pre><pre class="diff" id="context"> AbstractOperationTypeUse other = (AbstractOperationTypeUse) object;
// CHECKSTYLE ON IllegalTypeCheck
</pre><pre class="diff" id="removed">- return _operation == other._operation && _usedType == other._usedType;
</pre><pre class="diff" id="added">+ return _operation == other._operation && _usedTypeReference == other._usedTypeReference;
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ArrayTypeReference.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- ArrayTypeReference.java 9 Jan 2005 11:58:14 -0000 1.1
+++ ArrayTypeReference.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: ArrayTypeReference.java,v 1.<span id="removedchars">1 2005/01/09 11:58:1</span>4 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ArrayTypeReference.java,v 1.<span id="addedchars">2 2005/01/15 00:37:0</span>4 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ArrayTypeReference implements TypeReference {
private final Type _type;
</pre><pre class="diff"><small id="info">@@ -78,4 +78,10 @@
</small></pre><pre class="diff" id="context"> public int hashCode() {
return _type.hashCode() ^ _dimenstions;
}
</pre><pre class="diff" id="added">+
+ public void accept(FactVisitor visitor) {
+ Assert.isTrue(visitor != null, "visitor can't be null");
+
+ visitor.visit("array-reference", _type);
+ }
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Constructor.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- Constructor.java 5 Jan 2005 03:25:19 -0000 1.1
+++ Constructor.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -24,12 +24,17 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.Assert;
+
</pre><pre class="diff" id="context"> /**
</pre><pre class="diff" id="removed">- * @version $Id: Constructor.java,v 1.1 2005/01/05 03:25:19 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Constructor.java,v 1.2 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class Constructor extends Operation {
</pre><pre class="diff" id="removed">- public Constructor(Type declaringType, String signature, Type returnType) {
- super(declaringType, "<init>", signature, returnType);
</pre><pre class="diff" id="added">+ public Constructor(Type declaringType, String signature, TypeReference returnTypeReference) {
+ super(declaringType, "<init>", signature, returnTypeReference);
+ Assert.isTrue(returnTypeReference != null, "returnTypeReference can't be null");
+ Assert.isTrue(returnTypeReference.getReferencedType().getName().equals("void"),
+ "Constructor must return void");
</pre><pre class="diff" id="context"> }
public String toString() {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>DirectExtension.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- DirectExtension.java 8 Dec 2004 06:02:00 -0000 1.3
+++ DirectExtension.java 15 Jan 2005 00:37:04 -0000 1.4
@@ -28,19 +28,20 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DirectExtension.java,v 1.3 2004/12/08 06:02:00 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DirectExtension.java,v 1.4 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class DirectExtension implements TypeUse, Extension {
private final Type _subType;
</pre><pre class="diff" id="removed">- private final Type _superType;
</pre><pre class="diff" id="added">+ private final TypeReference _superTypeReference;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public DirectExtension(Type subType, Type superType) {
</pre><pre class="diff" id="added">+ public DirectExtension(Type subType, TypeReference superTypeReference) {
</pre><pre class="diff" id="context"> Assert.isTrue(subType != null, "subType can't be null");
</pre><pre class="diff" id="removed">- Assert.isTrue(superType != null, "superType can't be null");
- Assert.isTrue(subType != superType, "subType can't be superType");
</pre><pre class="diff" id="added">+ Assert.isTrue(superTypeReference != null, "superTypereference can't be null");
+ Assert.isTrue(subType != superTypeReference.getReferencedType(), "subType can't be superType");
+ Assert.isTrue(!superTypeReference.isArray(), "cannot extend an array");
</pre><pre class="diff" id="context">
_subType = subType;
</pre><pre class="diff" id="removed">- _superType = superType;
</pre><pre class="diff" id="added">+ _superTypeReference = superTypeReference;
</pre><pre class="diff" id="context"> }
public Type getSubType() {
</pre><pre class="diff"><small id="info">@@ -48,7 +49,7 @@
</small></pre><pre class="diff" id="context"> }
public Type getSuperType() {
</pre><pre class="diff" id="removed">- return _superType;
</pre><pre class="diff" id="added">+ return _superTypeReference.getReferencedType();
</pre><pre class="diff" id="context"> }
public Type getUsingType() {
</pre><pre class="diff"><small id="info">@@ -59,15 +60,19 @@
</small></pre><pre class="diff" id="context"> return getSuperType();
}
</pre><pre class="diff" id="added">+ public TypeReference getUsedTypeReference() {
+ return _superTypeReference;
+ }
+
</pre><pre class="diff" id="context"> public void accept(FactVisitor visitor) {
Assert.isTrue(visitor != null, "visitor can't be null");
visitor.visit("sub-type", _subType);
</pre><pre class="diff" id="removed">- visitor.visit("super-type", _superType);
</pre><pre class="diff" id="added">+ visitor.visit("super-type", _superTypeReference.getReferencedType());
</pre><pre class="diff" id="context"> }
public int hashCode() {
</pre><pre class="diff" id="removed">- return _subType.hashCode() ^ _superType.hashCode();
</pre><pre class="diff" id="added">+ return _subType.hashCode() ^ _superType<span id="addedchars">Reference</span>.hashCode();
</pre><pre class="diff" id="context"> }
public boolean equals(Object object) {
</pre><pre class="diff"><small id="info">@@ -79,7 +84,7 @@
</small></pre><pre class="diff" id="context">
DirectExtension other = (DirectExtension) object;
</pre><pre class="diff" id="removed">- return _subType == other._subType && _superType == other._superType;
</pre><pre class="diff" id="added">+ return _subType == other._subType && _superTypeReference == other._superTypeReference;
</pre><pre class="diff" id="context"> }
public String toString() {
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Field.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- Field.java 13 Dec 2004 00:12:46 -0000 1.3
+++ Field.java 15 Jan 2005 00:37:04 -0000 1.4
@@ -27,19 +27,19 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.util.Assert;
/**
</pre><pre class="diff" id="removed">- * @version $Id: Field.java,v 1.3 2004/12/13 00:12:46 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Field.java,v 1.4 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class Field implements Fact, TypeUse {
private final String _name;
</pre><pre class="diff" id="removed">- private final Type _fieldType;
</pre><pre class="diff" id="added">+ private final TypeReference _fieldTypeReference;
</pre><pre class="diff" id="context"> private final Type _declaringType;
</pre><pre class="diff" id="removed">- public Field(Type declaringType, String name, Type<span id="removedchars"> fieldTyp</span>e) {
</pre><pre class="diff" id="added">+ public Field(Type declaringType, String name, Type<span id="addedchars">Reference fieldTypeReferenc</span>e) {
</pre><pre class="diff" id="context"> Assert.isTrue(declaringType != null, "declaringType can't be null");
Assert.isTrue(name != null, "name can't be null");
</pre><pre class="diff" id="removed">- Assert.isTrue(fieldType != null, "fieldType can't be null");
</pre><pre class="diff" id="added">+ Assert.isTrue(fieldTypeReference != null, "fieldTypeReference can't be null");
</pre><pre class="diff" id="context"> _name = name;
</pre><pre class="diff" id="removed">- _fieldType = fieldType;
</pre><pre class="diff" id="added">+ _fieldTypeReference = fieldTypeReference;
</pre><pre class="diff" id="context"> _declaringType = declaringType;
}
</pre><pre class="diff"><small id="info">@@ -52,7 +52,7 @@
</small></pre><pre class="diff" id="context"> }
Field other = (Field) object;
return _declaringType.equals(other._declaringType) && _name.equals(other._name)
</pre><pre class="diff" id="removed">- && _fieldType.equals(other._fieldType);
</pre><pre class="diff" id="added">+ && _fieldTypeReference.equals(other._fieldTypeReference);
</pre><pre class="diff" id="context"> }
public int hashCode() {
</pre><pre class="diff"><small id="info">@@ -60,20 +60,20 @@
</small></pre><pre class="diff" id="context"> }
public String toString() {
</pre><pre class="diff" id="removed">- return "Field " + _declaringType + '.' + _name + " is of type " + _fieldType;
</pre><pre class="diff" id="added">+ return "Field " + _declaringType + '.' + _name + " is of type " + _fieldType<span id="addedchars">Reference</span>;
</pre><pre class="diff" id="context"> }
public void accept(FactVisitor visitor) {
Assert.isTrue(visitor != null, "visitor can't be null");
</pre><pre class="diff" id="removed">- visitor.visit("type", _fieldType);
</pre><pre class="diff" id="added">+ visitor.visit("type-reference", _fieldTypeReference);
</pre><pre class="diff" id="context"> }
public String getName() {
return _name;
}
</pre><pre class="diff" id="removed">- public Type getFieldType() {
- return _fieldType;
</pre><pre class="diff" id="added">+ public TypeReference getFieldTypeReference() {
+ return _fieldTypeReference;
</pre><pre class="diff" id="context"> }
public Type getDeclaringType() {
</pre><pre class="diff"><small id="info">@@ -85,6 +85,10 @@
</small></pre><pre class="diff" id="context"> }
public Type getUsedType() {
</pre><pre class="diff" id="removed">- return _fieldType;
</pre><pre class="diff" id="added">+ return _fieldTypeReference.getReferencedType();
+ }
+
+ public TypeReference getUsedTypeReference() {
+ return _fieldTypeReference;
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>InstantiationTypeUse.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- InstantiationTypeUse.java 13 Dec 2004 00:11:35 -0000 1.1
+++ InstantiationTypeUse.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -25,14 +25,14 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.facts;
/**
</pre><pre class="diff" id="removed">- * @version $Id: InstantiationTypeUse.java,v 1.1 2004/12/13 00:11:35 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: InstantiationTypeUse.java,v 1.2 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class InstantiationTypeUse extends AbstractOperationTypeUse {
</pre><pre class="diff" id="removed">- public InstantiationTypeUse(Operation operation, Type usedType) {
- super(operation, usedType);
</pre><pre class="diff" id="added">+ public InstantiationTypeUse(Operation operation, TypeReference usedTypeReference) {
+ super(operation, usedTypeReference);
</pre><pre class="diff" id="context"> }
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " instantiates object of type " + getUsedType();
</pre><pre class="diff" id="added">+ return getOperation() + " instantiates object of type " + getUsedType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>LocalVariable.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- LocalVariable.java 10 Dec 2004 02:08:58 -0000 1.1
+++ LocalVariable.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -25,18 +25,18 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.facts;
/**
</pre><pre class="diff" id="removed">- * @version $Id: LocalVariable.java,v 1.1 2004/12/10 02:08:58 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: LocalVariable.java,v 1.2 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class LocalVariable extends AbstractOperationTypeUse {
private final String _name;
</pre><pre class="diff" id="removed">- public LocalVariable(Operation operation, String name, Type localVariableType) {
- super(operation, localVariableType);
</pre><pre class="diff" id="added">+ public LocalVariable(Operation operation, String name, TypeReference localVariableTypeReference) {
+ super(operation, localVariableTypeReference);
</pre><pre class="diff" id="context"> _name = name;
}
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " has local variable " + _name + " of type " + getUsedType();
</pre><pre class="diff" id="added">+ return getOperation() + " has local variable " + _name + " of type " + getUsedType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
public String getName() {
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Operation.java</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- Operation.java 10 Dec 2004 11:48:59 -0000 1.8
+++ Operation.java 15 Jan 2005 00:37:04 -0000 1.9
@@ -28,15 +28,15 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: Operation.java,v 1.<span id="removedchars">8 2004/12/10 11:48:59</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Operation.java,v 1.<span id="addedchars">9 2005/01/15 00:37:04</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class Operation implements Fact {
private final Type _declaringType;
private final String _name;
</pre><pre class="diff" id="removed">- private final Type _returnType;
</pre><pre class="diff" id="added">+ private final TypeReference _returnTypeReference;
</pre><pre class="diff" id="context"> private final String _signature;
</pre><pre class="diff" id="removed">- public Operation(Type declaringType, String name, String signature, Type<span id="removedchars"> returnTyp</span>e) {
</pre><pre class="diff" id="added">+ public Operation(Type declaringType, String name, String signature, Type<span id="addedchars">Reference returnTypeReferenc</span>e) {
</pre><pre class="diff" id="context"> Assert.isTrue(declaringType != null, "declaringType can't be null");
Assert.isTrue(name != null, "name can't be null");
Assert.isTrue(signature != null, "signature can't be null");
</pre><pre class="diff"><small id="info">@@ -44,7 +44,7 @@
</small></pre><pre class="diff" id="context"> _declaringType = declaringType;
_name = name.intern();
_signature = signature.intern();
</pre><pre class="diff" id="removed">- _returnType = returnType;
</pre><pre class="diff" id="added">+ _returnTypeReference = returnTypeReference;
</pre><pre class="diff" id="context"> }
public Type getDeclaringType() {
</pre><pre class="diff"><small id="info">@@ -55,8 +55,8 @@
</small></pre><pre class="diff" id="context"> return _name;
}
</pre><pre class="diff" id="removed">- public Type getReturnType() {
- return _returnType;
</pre><pre class="diff" id="added">+ public TypeReference getReturnTypeReference() {
+ return _returnTypeReference;
</pre><pre class="diff" id="context"> }
public String getSignature() {
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ParameterTypeUse.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- ParameterTypeUse.java 8 Dec 2004 06:02:01 -0000 1.3
+++ ParameterTypeUse.java 15 Jan 2005 00:37:04 -0000 1.4
@@ -26,14 +26,14 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ParameterTypeUse.java,v 1.3 2004/12/08 06:02:01 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ParameterTypeUse.java,v 1.4 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ParameterTypeUse extends AbstractOperationTypeUse {
</pre><pre class="diff" id="removed">- public ParameterTypeUse(Operation operation, Type type) {
- super(operation, type);
</pre><pre class="diff" id="added">+ public ParameterTypeUse(Operation operation, TypeReference typeReference) {
+ super(operation, typeReference);
</pre><pre class="diff" id="context"> }
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " has a parameter of type " + getUsedType();
</pre><pre class="diff" id="added">+ return getOperation() + " has a parameter of type " + getUsedType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ReturnTypeUse.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- ReturnTypeUse.java 8 Dec 2004 06:02:01 -0000 1.4
+++ ReturnTypeUse.java 15 Jan 2005 00:37:04 -0000 1.5
@@ -28,19 +28,19 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ReturnTypeUse.java,v 1.4 2004/12/08 06:02:01 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ReturnTypeUse.java,v 1.5 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ReturnTypeUse extends AbstractOperationTypeUse {
public ReturnTypeUse(Operation operation) {
</pre><pre class="diff" id="removed">- super(operation, getReturnType(operation));
</pre><pre class="diff" id="added">+ super(operation, getReturnType<span id="addedchars">Reference</span>(operation));
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- private static Type getReturnType(Operation operation) {
</pre><pre class="diff" id="added">+ private static TypeReference getReturnTypeReference(Operation operation) {
</pre><pre class="diff" id="context"> Assert.isTrue(operation != null, "operation can't be null");
</pre><pre class="diff" id="removed">- return operation.getReturnType();
</pre><pre class="diff" id="added">+ return operation.getReturnType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " returns " + getUsedType();
</pre><pre class="diff" id="added">+ return getOperation() + " returns " + getUsedType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ScalarTypeReference.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- ScalarTypeReference.java 4 Jan 2005 20:38:07 -0000 1.1
+++ ScalarTypeReference.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: ScalarTypeReference.java,v 1.<span id="removedchars">1 2005/01/04 20:38:07</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ScalarTypeReference.java,v 1.<span id="addedchars">2 2005/01/15 00:37:04</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ScalarTypeReference implements TypeReference {
private final Type _type;
</pre><pre class="diff"><small id="info">@@ -73,4 +73,10 @@
</small></pre><pre class="diff" id="context"> public int hashCode() {
return _type.hashCode();
}
</pre><pre class="diff" id="added">+
+ public void accept(FactVisitor visitor) {
+ Assert.isTrue(visitor != null, "visitor can't be null");
+
+ visitor.visit("scalar-reference", _type);
+ }
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>SimpleType.java</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- SimpleType.java 17 Dec 2004 01:55:53 -0000 1.8
+++ SimpleType.java 15 Jan 2005 00:37:04 -0000 1.9
@@ -30,7 +30,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: SimpleType.java,v 1.8 2004/12/17 01:55:53 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: SimpleType.java,v 1.9 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class SimpleType extends AbstractType implements Type {
private final Set _typeUsages = new HashSet();
</pre><pre class="diff"><small id="info">@@ -48,8 +48,8 @@
</small></pre><pre class="diff" id="context"> return _typeUsages;
}
</pre><pre class="diff" id="removed">- public void addSuperType(Type superType) {
- DirectExtension extension = new DirectExtension(this, superType);
</pre><pre class="diff" id="added">+ public void addSuperType(TypeReference superTypeReference) {
+ DirectExtension extension = new DirectExtension(this, superTypeReference);
</pre><pre class="diff" id="context"> _superTypes.add(extension);
addTypeUse(extension);
}
</pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>StaticFieldTypeUse.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- StaticFieldTypeUse.java 13 Dec 2004 00:12:46 -0000 1.2
+++ StaticFieldTypeUse.java 15 Jan 2005 00:37:04 -0000 1.3
@@ -24,19 +24,23 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.Assert;
+
</pre><pre class="diff" id="context"> /**
</pre><pre class="diff" id="removed">- * @version $Id: StaticFieldTypeUse.java,v 1.2 2004/12/13 00:12:46 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: StaticFieldTypeUse.java,v 1.3 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class StaticFieldTypeUse extends AbstractOperationTypeUse {
private final String _name;
</pre><pre class="diff" id="removed">- public StaticFieldTypeUse(Operation operation, Type declaredType, String fieldName) {
- super(operation, declaredType);
</pre><pre class="diff" id="added">+ public StaticFieldTypeUse(Operation operation, TypeReference declaredTypeReference, String fieldName) {
+ super(operation, declaredTypeReference);
+ Assert.isTrue(declaredTypeReference != null, "declaredTypeReference can't be null");
+ Assert.isTrue(!declaredTypeReference.isArray(), "declaring type cannot be an array");
</pre><pre class="diff" id="context"> _name = fieldName;
}
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " uses static field " + getUsedType() + '.' + _name;
</pre><pre class="diff" id="added">+ return getOperation() + " uses static field " + getUsedType<span id="addedchars">Reference</span>() + '.' + _name;
</pre><pre class="diff" id="context"> }
public String getName() {
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>StaticInitialiser.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- StaticInitialiser.java 5 Jan 2005 03:25:19 -0000 1.1
+++ StaticInitialiser.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -25,11 +25,11 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.facts;
/**
</pre><pre class="diff" id="removed">- * @version $Id: StaticInitialiser.java,v 1.1 2005/01/05 03:25:19 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: StaticInitialiser.java,v 1.2 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class StaticInitialiser extends Operation {
</pre><pre class="diff" id="removed">- public StaticInitialiser(Type declaringType, String signature, Type returnType) {
- super(declaringType, "<clinit>", signature, returnType);
</pre><pre class="diff" id="added">+ public StaticInitialiser(Type declaringType, String signature, TypeReference returnTypeReference) {
+ super(declaringType, "<clinit>", signature, returnTypeReference);
</pre><pre class="diff" id="context"> }
public String toString() {
</pre></div>
<hr /><a name="file15" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>StaticOperationTypeUse.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- StaticOperationTypeUse.java 10 Dec 2004 11:48:59 -0000 1.2
+++ StaticOperationTypeUse.java 15 Jan 2005 00:37:04 -0000 1.3
@@ -24,14 +24,18 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.Assert;
+
</pre><pre class="diff" id="context"> /**
</pre><pre class="diff" id="removed">- * @version $Id: StaticOperationTypeUse.java,v 1.<span id="removedchars">2 2004/12/10 11:48:59</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: StaticOperationTypeUse.java,v 1.<span id="addedchars">3 2005/01/15 00:37:04</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class StaticOperationTypeUse extends AbstractOperationTypeUse {
private final String _name;
</pre><pre class="diff" id="removed">- public StaticOperationTypeUse(Operation operation, Type declaringType, String name) {
- super(operation, declaringType);
</pre><pre class="diff" id="added">+ public StaticOperationTypeUse(Operation operation, TypeReference declaringTypeReference, String name) {
+ super(operation, declaringTypeReference);
+ Assert.isTrue(declaringTypeReference != null, "declaringTypeReference can't be null");
+ Assert.isTrue(!declaringTypeReference.isArray(), "declaring type cannot be an array");
</pre><pre class="diff" id="context"> _name = name;
}
</pre></div>
<hr /><a name="file16" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ThrowableTypeUse.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- ThrowableTypeUse.java 8 Dec 2004 06:02:01 -0000 1.3
+++ ThrowableTypeUse.java 15 Jan 2005 00:37:04 -0000 1.4
@@ -24,16 +24,20 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.Assert;
+
</pre><pre class="diff" id="context"> /**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ThrowableTypeUse.java,v 1.3 2004/12/08 06:02:01 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ThrowableTypeUse.java,v 1.4 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ThrowableTypeUse extends AbstractOperationTypeUse {
</pre><pre class="diff" id="removed">- public ThrowableTypeUse(Operation operation, Type type) {
- super(operation, type);
</pre><pre class="diff" id="added">+ public ThrowableTypeUse(Operation operation, TypeReference typeReference) {
+ super(operation, typeReference);
+ Assert.isTrue(typeReference != null, "typeReference can't be null");
+ Assert.isTrue(!typeReference.isArray(), "cannot throw an array");
</pre><pre class="diff" id="context"> }
public String toString() {
</pre><pre class="diff" id="removed">- return getOperation() + " throws " + getUsedType();
</pre><pre class="diff" id="added">+ return getOperation() + " throws " + getUsedType<span id="addedchars">Reference</span>();
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file17" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>TransitiveTypeUse.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- TransitiveTypeUse.java 17 Dec 2004 00:55:18 -0000 1.3
+++ TransitiveTypeUse.java 15 Jan 2005 00:37:04 -0000 1.4
@@ -27,7 +27,7 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.util.Assert;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TransitiveTypeUse.java,v 1.3 2004/12/17 00:55:18 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TransitiveTypeUse.java,v 1.4 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class TransitiveTypeUse implements TypeUse {
private final TypeUse _lhs;
</pre><pre class="diff"><small id="info">@@ -42,6 +42,10 @@
</small></pre><pre class="diff" id="context"> return _rhs.getUsedType();
}
</pre><pre class="diff" id="added">+ public TypeReference getUsedTypeReference() {
+ return _rhs.getUsedTypeReference();
+ }
+
</pre><pre class="diff" id="context"> public Type getUsingType() {
return _lhs.getUsingType();
}
</pre></div>
<hr /><a name="file18" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>TypeReference.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- TypeReference.java 4 Jan 2005 20:38:09 -0000 1.1
+++ TypeReference.java 15 Jan 2005 00:37:04 -0000 1.2
@@ -30,9 +30,9 @@
</small></pre><pre class="diff" id="context"> * between a return type that is a simple String and an array of String objects.
*
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: TypeReference.java,v 1.<span id="removedchars">1 2005/01/04 20:38:09</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeReference.java,v 1.<span id="addedchars">2 2005/01/15 00:37:04</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
</pre><pre class="diff" id="removed">-public interface TypeReference {
</pre><pre class="diff" id="added">+public interface TypeReference <span id="addedchars">extends Fact </span>{
</pre><pre class="diff" id="context"> /**
* @return the {@link Type} being referenced.
*/
</pre></div>
<hr /><a name="file19" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>TypeUse.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- TypeUse.java 8 Dec 2004 06:02:01 -0000 1.2
+++ TypeUse.java 15 Jan 2005 00:37:04 -0000 1.3
@@ -25,11 +25,16 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.facts;
/**
</pre><pre class="diff" id="added">+ * Represents the coupling of one {@link Type} to another.
+ * A type 'uses' another type via a {@link TypeReference}.
</pre><pre class="diff" id="context"> * @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: TypeUse.java,v 1.2 2004/12/08 06:02:01 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: TypeUse.java,v 1.3 2005/01/15 00:37:04 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public interface TypeUse extends Fact {
public Type getUsingType();
public Type getUsedType();
</pre><pre class="diff" id="added">+
+ public TypeReference getUsedTypeReference();
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file20" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>DefaultTypeReferenceFactory.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultTypeReferenceFactory.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultTypeReferenceFactory.java 15 Jan 2005 00:37:07 -0000 1.1
@@ -0,0 +1,86 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import net.sf.joodi.util.Assert;
+import net.sf.joodi.facts.TypeReference;
+import net.sf.joodi.facts.ScalarTypeReference;
+import net.sf.joodi.facts.Type;
+import net.sf.joodi.facts.ArrayTypeReference;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Creates and caches {@link net.sf.joodi.facts.TypeReference} objects.
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: DefaultTypeReferenceFactory.java,v 1.1 2005/01/15 00:37:07 jimmyjazz Exp $
+ */
+public class DefaultTypeReferenceFactory implements TypeReferenceFactory {
+ private final TypeLibrary _library;
+ private final Map _cache = new HashMap();
+
+ /**
+ * The only supported constructor.
+ * @param library the type library containing all types to be referenced.
+ */
+ public DefaultTypeReferenceFactory(TypeLibrary library) {
+ Assert.isTrue(library != null, "library can't be null");
+
+ _library = library;
+ }
+
+ /**
+ * Obtain a reference to the named type.
+ * @param typeName the fully-qualified name of the type; can include pairs of brackets
+ * indicating array references, such as 'java.util.String[][]'.
+ * @return a {@link TypeReference} to the supplied type.
+ */
+ public TypeReference createTypeReference(String typeName) {
+ if (!_cache.containsKey(typeName)) {
+ _cache.put(typeName, newTypeReference(typeName));
+ }
+
+ return (TypeReference) _cache.get(typeName);
+ }
+
+ private TypeReference newTypeReference(String typeName) {
+ int dimensions = 0;
+ String rootTypeName = typeName;
+
+ while (rootTypeName.endsWith("[]")) {
+ ++dimensions;
+ rootTypeName = rootTypeName.substring(0, rootTypeName.length() - 2);
+ }
+
+ Type referencedType = _library.getType(rootTypeName);
+
+ if (dimensions == 0) {
+ return new ScalarTypeReference(referencedType);
+ } else {
+ return new ArrayTypeReference(referencedType, dimensions);
+ }
+ }
+}
</pre></div>
<hr /><a name="file21" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitor.java</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- ModelBuildingTypeVisitor.java 5 Jan 2005 04:49:11 -0000 1.7
+++ ModelBuildingTypeVisitor.java 15 Jan 2005 00:37:07 -0000 1.8
@@ -30,17 +30,22 @@
</small></pre><pre class="diff" id="context"> // CHECKSTYLE OFF au.com.redhillconsulting.jamaica.tools.checkstyle.ClassDataAbstractionCouplingCheck
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitor.java,v 1.7 2005/01/05 04:49:11 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: ModelBuildingTypeVisitor.java,v 1.8 2005/01/15 00:37:07 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitor implements TypeVisitor {
private final TypeLibrary _typeLibrary;
</pre><pre class="diff" id="added">+ private final TypeReferenceFactory _referenceFactory;
</pre><pre class="diff" id="context">
private SimpleType _type;
private Operation _operation;
</pre><pre class="diff" id="removed">- public ModelBuildingTypeVisitor(TypeLibrary typeLibrary) {
</pre><pre class="diff" id="added">+ public ModelBuildingTypeVisitor(TypeLibrary typeLibrary, TypeReferenceFactory referenceFactory) {
</pre><pre class="diff" id="context"> Assert.isTrue(typeLibrary != null, "typeLibrary can't be null");
</pre><pre class="diff" id="added">+ Assert.isTrue(referenceFactory != null, "referenceFactory can't be null");
+
</pre><pre class="diff" id="context"> _typeLibrary = typeLibrary;
</pre><pre class="diff" id="added">+ _referenceFactory = referenceFactory;
</pre><pre class="diff" id="context"> }
public void visitType(String name) {
</pre><pre class="diff"><small id="info">@@ -52,7 +57,7 @@
</small></pre><pre class="diff" id="context"> Assert.isTrue(name != null, "name can't be null");
if (!name.equals(Object.class.getName())) {
</pre><pre class="diff" id="removed">- _type.addSuperType(_typeLibrary.getType(name));
</pre><pre class="diff" id="added">+ _type.addSuperType(_referenceFactory.createTypeReference(name));
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">@@ -61,42 +66,46 @@
</small></pre><pre class="diff" id="context"> Assert.isTrue(name != null, "name can't be null");
if (name.equals("<init>")) {
</pre><pre class="diff" id="removed">- _operation = new Constructor(_type, signature, _<span id="removedchars">typeLibrary.getTyp</span>e(returnTypeName));
</...
[truncated message content] |
|
From: James R. <jim...@us...> - 2005-01-09 13:04:08
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file1"><span id="added">TypeReferenceFactory.java</span></a></tt></td><td align="right" id="added">+86</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/parser/<a href="#file2"><span id="added">TypeReferenceFactoryTest.java</span></a></tt></td><td align="right" id="added">+118</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td></td><td align="right" id="added">+204</td><td></td><td></td></tr>
</table>
<small id="info">2 added files</small><br />
<pre class="comment">
introduced concept of TypeReferenceFactory
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>TypeReferenceFactory.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N TypeReferenceFactory.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ TypeReferenceFactory.java 9 Jan 2005 13:03:56 -0000 1.1
@@ -0,0 +1,86 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import net.sf.joodi.util.Assert;
+import net.sf.joodi.facts.TypeReference;
+import net.sf.joodi.facts.ScalarTypeReference;
+import net.sf.joodi.facts.Type;
+import net.sf.joodi.facts.ArrayTypeReference;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Creates and caches {@link net.sf.joodi.facts.TypeReference} objects.
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: TypeReferenceFactory.java,v 1.1 2005/01/09 13:03:56 jimmyjazz Exp $
+ */
+public class TypeReferenceFactory {
+ private final TypeLibrary _library;
+ private final Map _cache = new HashMap();
+
+ /**
+ * The only supported constructor.
+ * @param library the type library containing all types to be referenced.
+ */
+ public TypeReferenceFactory(TypeLibrary library) {
+ Assert.isTrue(library != null, "library can't be null");
+
+ _library = library;
+ }
+
+ /**
+ * Obtain a reference to the named type.
+ * @param typeName the fully-qualified name of the type; can include pairs of brackets
+ * indicating array references, such as 'java.util.String[][]'.
+ * @return a {@link TypeReference} to the supplied type.
+ */
+ public TypeReference createTypeReference(String typeName) {
+ if (!_cache.containsKey(typeName)) {
+ _cache.put(typeName, newTypeReference(typeName));
+ }
+
+ return (TypeReference) _cache.get(typeName);
+ }
+
+ private TypeReference newTypeReference(String typeName) {
+ int dimensions = 0;
+ String rootTypeName = typeName;
+
+ while (rootTypeName.endsWith("[]")) {
+ ++dimensions;
+ rootTypeName = rootTypeName.substring(0, rootTypeName.length() - 2);
+ }
+
+ Type referencedType = _library.getType(rootTypeName);
+
+ if (dimensions == 0) {
+ return new ScalarTypeReference(referencedType);
+ } else {
+ return new ArrayTypeReference(referencedType, dimensions);
+ }
+ }
+}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>TypeReferenceFactoryTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N TypeReferenceFactoryTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ TypeReferenceFactoryTest.java 9 Jan 2005 13:03:57 -0000 1.1
@@ -0,0 +1,118 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import junit.framework.TestCase;
+import org.easymock.MockControl;
+import net.sf.joodi.facts.ScalarTypeReference;
+import net.sf.joodi.facts.DefaultNamespace;
+import net.sf.joodi.facts.SimpleType;
+import net.sf.joodi.facts.TypeReference;
+import net.sf.joodi.facts.ArrayTypeReference;
+
+/**
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: TypeReferenceFactoryTest.java,v 1.1 2005/01/09 13:03:57 jimmyjazz Exp $
+ */
+public class TypeReferenceFactoryTest extends TestCase {
+ private static final DefaultNamespace NAMESPACE = new DefaultNamespace("a.b");
+ private static final SimpleType TYPE_ABC = new SimpleType("a.b.c", NAMESPACE);
+
+ private MockControl _control = MockControl.createStrictControl(TypeLibrary.class);
+ private TypeLibrary _library = (TypeLibrary) _control.getMock();
+
+ public void testCreationOfScalarReference() {
+ _library.getType("a.b.c");
+ _control.setReturnValue(TYPE_ABC);
+
+ _control.replay();
+
+ TypeReferenceFactory factory = new TypeReferenceFactory(_library);
+ ScalarTypeReference reference = (ScalarTypeReference) factory.createTypeReference("a.b.c");
+
+ assertSame(TYPE_ABC, reference.getReferencedType());
+ assertFalse(reference.isArray());
+ assertEquals(0, reference.getArrayDimensions());
+
+ _control.verify();
+ }
+
+ public void testSameScalarReferenceIsReturnedOnMultipleCalls() {
+ final String typeName = TYPE_ABC.getName();
+
+ _library.getType(typeName);
+ _control.setReturnValue(TYPE_ABC);
+
+ _control.replay();
+
+ TypeReferenceFactory factory = new TypeReferenceFactory(_library);
+
+ TypeReference ref1 = factory.createTypeReference(typeName);
+ TypeReference ref2 = factory.createTypeReference(typeName);
+
+ assertTrue(ref1 == ref2);
+
+ _control.verify();
+ }
+
+ public void testCreationOfArrayReference() {
+ final String typeName = TYPE_ABC.getName();
+
+ // the library will get called once for each array
+ _library.getType(typeName);
+ _control.setReturnValue(TYPE_ABC);
+ _library.getType(typeName);
+ _control.setReturnValue(TYPE_ABC);
+ _library.getType(typeName);
+ _control.setReturnValue(TYPE_ABC);
+
+ _control.replay();
+
+ TypeReferenceFactory factory = new TypeReferenceFactory(_library);
+
+ // test 1-dimensional array
+ ArrayTypeReference reference = (ArrayTypeReference) factory.createTypeReference(typeName + "[]");
+ assertSame(TYPE_ABC, reference.getReferencedType());
+ assertTrue(reference.isArray());
+ assertEquals(1, reference.getArrayDimensions());
+
+ // test 2-dimensional array
+ reference = (ArrayTypeReference) factory.createTypeReference(typeName + "[][]");
+ assertSame(TYPE_ABC, reference.getReferencedType());
+ assertTrue(reference.isArray());
+ assertEquals(2, reference.getArrayDimensions());
+
+ // test 2-dimensional array
+ reference = (ArrayTypeReference) factory.createTypeReference(typeName + "[][][]");
+ assertSame(TYPE_ABC, reference.getReferencedType());
+ assertTrue(reference.isArray());
+ assertEquals(3, reference.getArrayDimensions());
+
+ // check if the reference is cached if we call it again
+ assertSame(reference, factory.createTypeReference(typeName + "[][][]"));
+
+ _control.verify();
+ }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2005-01-09 11:58:24
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1"><span id="added">ArrayTypeReference.java</span></a></tt></td><td align="right" id="added">+81</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file2"><span id="added">ArrayTypeReferenceTest.java</span></a></tt></td><td align="right" id="added">+83</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td></td><td align="right" id="added">+164</td><td></td><td></td></tr>
</table>
<small id="info">2 added files</small><br />
<pre class="comment">
Introduced concept of ArrayTypeReference
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>ArrayTypeReference.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N ArrayTypeReference.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ArrayTypeReference.java 9 Jan 2005 11:58:14 -0000 1.1
@@ -0,0 +1,81 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import net.sf.joodi.util.Assert;
+
+/**
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: ArrayTypeReference.java,v 1.1 2005/01/09 11:58:14 jimmyjazz Exp $
+ */
+public class ArrayTypeReference implements TypeReference {
+ private final Type _type;
+ private final int _dimenstions;
+
+ public ArrayTypeReference(Type type, int dimensions) {
+ Assert.isTrue(type != null, "type can't be null");
+ Assert.isTrue(dimensions > 0, "Number of dimentions must be a positive integer");
+
+ _type = type;
+ _dimenstions = dimensions;
+ }
+
+ public boolean isArray() {
+ return true;
+ }
+
+ public int getArrayDimensions() {
+ return _dimenstions;
+ }
+
+ public Type getReferencedType() {
+ return _type;
+ }
+
+ /**
+ * Equality is based on the referenced type being the same object
+ * instance as the one referenced by this object.
+ * The dimensions must also be the same. Of course, the other
+ * object must also be an array reference.
+ * @param obj the object to test.
+ * @return true if the other scalar reference is to the same {@link Type} instance.
+ */
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+
+ if (!(obj instanceof ArrayTypeReference)) {
+ return false;
+ }
+
+ final ArrayTypeReference other = (ArrayTypeReference) obj;
+ return _type == other._type && _dimenstions == other._dimenstions;
+ }
+
+ public int hashCode() {
+ return _type.hashCode() ^ _dimenstions;
+ }
+}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>ArrayTypeReferenceTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N ArrayTypeReferenceTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ArrayTypeReferenceTest.java 9 Jan 2005 11:58:15 -0000 1.1
@@ -0,0 +1,83 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: ArrayTypeReferenceTest.java,v 1.1 2005/01/09 11:58:15 jimmyjazz Exp $
+ */
+public class ArrayTypeReferenceTest extends TestCase {
+ private static final DefaultNamespace NAMESPACE = new DefaultNamespace("a.b");
+ private static final SimpleType TYPE_ABC_1 = new SimpleType("a.b.c", NAMESPACE);
+ private static final SimpleType TYPE_ABC_2 = new SimpleType("a.b.c", NAMESPACE);
+
+ public void testIsATypeReference() {
+ assertTrue(TypeReference.class.isAssignableFrom(ArrayTypeReference.class));
+ }
+
+ public void testArrayTypeReferenceIsAnArray() {
+ TypeReference reference = new ArrayTypeReference(TYPE_ABC_1, 1);
+ assertTrue(reference.isArray());
+ assertEquals(1, reference.getArrayDimensions());
+ }
+
+ public void testNoSuchThingAsZeroDimensionalArray() {
+ try {
+ TypeReference reference = new ArrayTypeReference(TYPE_ABC_1, 0);
+ fail("should have barfed");
+ } catch (Exception e) {
+ assertEquals("Number of dimentions must be a positive integer", e.getMessage());
+ }
+ }
+
+ public void testArrayReferencesToTheSameTypeWithSameDimensionsAreEqual() {
+ TypeReference ref1 = new ArrayTypeReference(TYPE_ABC_1, 5);
+ TypeReference ref2 = new ArrayTypeReference(TYPE_ABC_1, 5);
+
+ assertEquals(ref1, ref2);
+ }
+
+ public void testArrayReferencesToTheSameTypeWithDifferentDimensionsAreNotEqual() {
+ TypeReference ref1 = new ArrayTypeReference(TYPE_ABC_1, 5);
+ TypeReference ref2 = new ArrayTypeReference(TYPE_ABC_1, 2);
+
+ assertFalse(ref1.equals(ref2));
+ }
+
+ public void testTypePassedInConstructorIsReferencedType() {
+ TypeReference reference = new ArrayTypeReference(TYPE_ABC_1, 3);
+ assertSame(TYPE_ABC_1, reference.getReferencedType());
+ assertEquals(3, reference.getArrayDimensions());
+ }
+
+ public void testTwoArrayTypeReferencesToTypesWithTheSameNameAreNotEqual() {
+ ArrayTypeReference reference1 = new ArrayTypeReference(TYPE_ABC_1, 1);
+ ArrayTypeReference reference2 = new ArrayTypeReference(TYPE_ABC_2, 1);
+
+ assertFalse(reference1.equals(reference2));
+ }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2005-01-08 11:53:42
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>conf/<a href="#file1">checkstyle-test.xml</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1.1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file2">ScalarTypeReferenceTest.java</a></tt></td><td align="right" id="added">+19</td><td align="right" id="removed">-16</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file3">SimpleTypeTest.java</a></tt></td><td align="right" id="added">+19</td><td align="right" id="removed">-16</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr class="alt"><td><tt> /<a href="#file4">TypeTest.java</a></tt></td><td align="right" id="added">+19</td><td align="right" id="removed">-16</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td></td><td align="right" id="added">+61</td><td align="right" id="removed">-49</td><td></td></tr>
</table>
<small id="info">4 modified files</small><br />
<pre class="comment">
Forced licence header to be consistent for test classes
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/conf<br /></span>
<div class="fileheader"><big><b>checkstyle-test.xml</b></big> <small id="info">1.1.1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1.1.1 -r1.2
--- checkstyle-test.xml 7 Oct 2004 07:19:34 -0000 1.1.1.1
+++ checkstyle-test.xml 8 Jan 2005 11:53:30 -0000 1.2
@@ -1,5 +1,5 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0" encoding="UTF-8"?>
</pre><pre class="diff" id="removed">-<!-- $Id: checkstyle-test.xml,v 1.<span id="removedchars">1.1.1 2004/10/07 07:19:34</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: checkstyle-test.xml,v 1.<span id="addedchars">2 2005/01/08 11:53:30</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="context">
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
</pre><pre class="diff"><small id="info">@@ -8,5 +8,8 @@
</small></pre><pre class="diff" id="context"> <module name="Checker">
<module name="TreeWalker">
<module name="au.com.redhillconsulting.jamaica.tools.checkstyle.JUnitTestCaseCheck"/>
</pre><pre class="diff" id="added">+ <module name="Header">
+ <property name="headerFile" value="${src.conf.dir}/checkstyle-header.txt"/>
+ </module>
</pre><pre class="diff" id="context"> </module>
</module>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ScalarTypeReferenceTest.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- ScalarTypeReferenceTest.java 4 Jan 2005 20:38:11 -0000 1.1
+++ ScalarTypeReferenceTest.java 8 Jan 2005 11:53:32 -0000 1.2
@@ -1,23 +1,26 @@
</small></pre><pre class="diff" id="removed">-/*
- * The RedHill Consulting, Pty. Ltd. Software License, Version 1.0
</pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
</pre><pre class="diff" id="context"> *
* Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
*
</pre><pre class="diff" id="removed">- * Redistribution and use in source or binary forms IS NOT PERMITTED
- * without prior written permission.
</pre><pre class="diff" id="added">+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
</pre><pre class="diff" id="context"> *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
</pre><pre class="diff" id="removed">- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
</pre><pre class="diff" id="added">+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff"><small id="info">@@ -25,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:ja...@ca...">James Ross</a>
</pre><pre class="diff" id="removed">- * @version $Id: ScalarTypeReferenceTest.java,v 1.<span id="removedchars">1 2005/01/04 20:38:11</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ScalarTypeReferenceTest.java,v 1.<span id="addedchars">2 2005/01/08 11:53:32</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ScalarTypeReferenceTest extends TestCase {
private static final DefaultNamespace NAMESPACE = new DefaultNamespace("a.b");
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>SimpleTypeTest.java</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- SimpleTypeTest.java 17 Dec 2004 01:55:55 -0000 1.8
+++ SimpleTypeTest.java 8 Jan 2005 11:53:32 -0000 1.9
@@ -1,23 +1,26 @@
</small></pre><pre class="diff" id="removed">-/*
- * The RedHill Consulting, Pty. Ltd. Software License, Version 1.0
</pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
</pre><pre class="diff" id="context"> *
* Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
*
</pre><pre class="diff" id="removed">- * Redistribution and use in source or binary forms IS NOT PERMITTED
- * without prior written permission.
</pre><pre class="diff" id="added">+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
</pre><pre class="diff" id="context"> *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
</pre><pre class="diff" id="removed">- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
</pre><pre class="diff" id="added">+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff"><small id="info">@@ -26,7 +29,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: SimpleTypeTest.java,v 1.8 2004/12/17 01:55:55 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: SimpleTypeTest.java,v 1.9 2005/01/08 11:53:32 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class SimpleTypeTest extends TestCase {
public void testIsAType() {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>TypeTest.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- TypeTest.java 8 Dec 2004 06:02:01 -0000 1.1
+++ TypeTest.java 8 Jan 2005 11:53:32 -0000 1.2
@@ -1,23 +1,26 @@
</small></pre><pre class="diff" id="removed">-/*
- * The RedHill Consulting, Pty. Ltd. Software License, Version 1.0
</pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
</pre><pre class="diff" id="context"> *
* Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
*
</pre><pre class="diff" id="removed">- * Redistribution and use in source or binary forms IS NOT PERMITTED
- * without prior written permission.
</pre><pre class="diff" id="added">+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
</pre><pre class="diff" id="context"> *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
</pre><pre class="diff" id="removed">- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
</pre><pre class="diff" id="added">+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff"><small id="info">@@ -25,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: TypeTest.java,v 1.1 2004/12/08 06:02:01 haruki_zaemon Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeTest.java,v 1.2 2005/01/08 11:53:32 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class TypeTest extends TestCase {
public void testIsAFact() {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-05 06:32:09
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/main/net/sf/joodi/parser</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr class="alt"><td><tt><a href="#file2">TypeLibrary.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.12 -> 1.13</td></tr>
<tr><td></td><td align="right" id="added">+3</td><td align="right" id="removed">-15</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
Removed TypeLibrary.getNamespaces().
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- DefaultTypeLibrary.java 5 Jan 2005 06:29:43 -0000 1.7
+++ DefaultTypeLibrary.java 5 Jan 2005 06:31:59 -0000 1.8
@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.<span id="removedchars">7 2005/01/05 06:29:43</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.<span id="addedchars">8 2005/01/05 06:31:59</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff"><small id="info">@@ -42,7 +42,7 @@
</small></pre><pre class="diff" id="context">
public DefaultTypeLibrary(NamespaceLibrary namespaceLibrary) {
_namespaceLibrary = namespaceLibrary;
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> DefaultNamespace defaultNamespace = getNamespace("");
addPrimitiveType("boolean", defaultNamespace);
addPrimitiveType("void", defaultNamespace);
</pre><pre class="diff"><small id="info">@@ -60,13 +60,6 @@
</small></pre><pre class="diff" id="context"> }
/**
</pre><pre class="diff" id="removed">- * Returns all namespaces contained in this library.
- */
- public Set getNamespaces() {
- return _namespaceLibrary.getNamespaces();
- }
-
- /**
</pre><pre class="diff" id="context"> * Returns all types contained in this library.
*/
public Set getTypes() {
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>TypeLibrary.java</b></big> <small id="info">1.12 -> 1.13</small></div>
<pre class="diff"><small id="info">diff -u -r1.12 -r1.13
--- TypeLibrary.java 5 Jan 2005 04:49:11 -0000 1.12
+++ TypeLibrary.java 5 Jan 2005 06:31:59 -0000 1.13
@@ -29,15 +29,10 @@
</small></pre><pre class="diff" id="context"> import java.util.Set;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TypeLibrary.java,v 1.1<span id="removedchars">2 2005/01/05 04:49:11</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeLibrary.java,v 1.1<span id="addedchars">3 2005/01/05 06:31:59</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public interface TypeLibrary {
/**
</pre><pre class="diff" id="removed">- * Returns all namespaces contained in this library.
- */
- Set getNamespaces();
-
- /**
</pre><pre class="diff" id="context"> * Returns all types contained in this library.
*/
Set getTypes();
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-05 06:29:57
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file1"><span id="added">DefaultNamespaceLibrary.java</span></a></tt></td><td align="right" id="added">+60</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2"><span id="added">NamespaceLibrary.java</span></a></tt></td><td align="right" id="added">+45</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file3">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+19</td><td align="right" id="removed">-22</td><td nowrap="nowrap" align="center">1.6 -> 1.7</td></tr>
<tr class="alt"><td><tt> /<a href="#file4">NamespaceFactBuilder.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt>main/net/sf/joodi/plugins/<a href="#file5">Joodi.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/parser/<a href="#file6"><span id="added">DefaultNamespaceLibraryTest.java</span></a></tt></td><td align="right" id="added">+85</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file7">DefaultTypeLibraryTest.java</a></tt></td><td align="right" id="added">+108</td><td align="right" id="removed">-41</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr class="alt"><td><tt> /<a href="#file8">NamespaceFactBuilderTest.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td></td><td align="right" id="added">+336</td><td align="right" id="removed">-77</td><td></td></tr>
</table>
<small id="info">3 added + 5 modified, total 8 files</small><br />
<pre class="comment">
Split namespace handling out of DefaultTypeLibrary and into NamespaceLibrary and implementations, so that the set of namespaces can be shared by more than one TypeLibrary.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>DefaultNamespaceLibrary.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultNamespaceLibrary.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultNamespaceLibrary.java 5 Jan 2005 06:29:43 -0000 1.1
@@ -0,0 +1,60 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import net.sf.joodi.facts.Namespace;
+import net.sf.joodi.facts.DefaultNamespace;
+
+import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ * A {@link NamespaceLibrary} that creates namespaces on demand.
+ * @version $Id: DefaultNamespaceLibrary.java,v 1.1 2005/01/05 06:29:43 adammurdoch Exp $
+ */
+public class DefaultNamespaceLibrary implements NamespaceLibrary {
+ private final Map _namespacesByName = new HashMap();
+
+ /**
+ * Returns a namespace by name.
+ */
+ public Namespace getNamespace(String name) {
+ Namespace namespace = (Namespace) _namespacesByName.get(name);
+ if (namespace == null) {
+ namespace = new DefaultNamespace(name);
+ _namespacesByName.put(name, namespace);
+ }
+ return namespace;
+ }
+
+ /**
+ * Returns all namespaces contained in this library.
+ */
+ public Set getNamespaces() {
+ return new HashSet(_namespacesByName.values());
+ }
+}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>NamespaceLibrary.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N NamespaceLibrary.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ NamespaceLibrary.java 5 Jan 2005 06:29:43 -0000 1.1
@@ -0,0 +1,45 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import net.sf.joodi.facts.Namespace;
+
+import java.util.Set;
+
+/**
+ * A repository of {@link Namespace} facts.
+ * @version $Id: NamespaceLibrary.java,v 1.1 2005/01/05 06:29:43 adammurdoch Exp $
+ */
+public interface NamespaceLibrary {
+ /**
+ * Returns all namespaces contained in this library.
+ */
+ Set getNamespaces();
+
+ /**
+ * Returns a namespace by name.
+ */
+ Namespace getNamespace(String name);
+}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.6 -> 1.7</small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- DefaultTypeLibrary.java 5 Jan 2005 04:49:11 -0000 1.6
+++ DefaultTypeLibrary.java 5 Jan 2005 06:29:43 -0000 1.7
@@ -34,33 +34,36 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.<span id="removedchars">6 2005/01/05 04:49:11</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.<span id="addedchars">7 2005/01/05 06:29:43</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff" id="removed">- private final Map _namespacesByName = new HashMap();
</pre><pre class="diff" id="added">+ private final NamespaceLibrary _namespaceLibrary;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public DefaultTypeLibrary() {
- addPrimitiveType("boolean");
- addPrimitiveType("void");
- addPrimitiveType("short");
- addPrimitiveType("int");
- addPrimitiveType("long");
- addPrimitiveType("float");
- addPrimitiveType("double");
- addPrimitiveType("char");
- addPrimitiveType("byte");
</pre><pre class="diff" id="added">+ public DefaultTypeLibrary(NamespaceLibrary namespaceLibrary) {
+ _namespaceLibrary = namespaceLibrary;
+
+ DefaultNamespace defaultNamespace = getNamespace("");
+ addPrimitiveType("boolean", defaultNamespace);
+ addPrimitiveType("void", defaultNamespace);
+ addPrimitiveType("short", defaultNamespace);
+ addPrimitiveType("int", defaultNamespace);
+ addPrimitiveType("long", defaultNamespace);
+ addPrimitiveType("float", defaultNamespace);
+ addPrimitiveType("double", defaultNamespace);
+ addPrimitiveType("char", defaultNamespace);
+ addPrimitiveType("byte", defaultNamespace);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- private void addPrimitiveType(String typeName) {
- _typesByName.put(typeName, new PrimitiveType(typeName, getNamespace("")));
</pre><pre class="diff" id="added">+ private void addPrimitiveType(String typeName, DefaultNamespace namespace) {
+ _typesByName.put(typeName, new PrimitiveType(typeName, namespace));
</pre><pre class="diff" id="context"> }
/**
* Returns all namespaces contained in this library.
*/
public Set getNamespaces() {
</pre><pre class="diff" id="removed">- return new HashSet(_namespacesByName.values());
</pre><pre class="diff" id="added">+ return _namespaceLibrary.getNamespaces();
</pre><pre class="diff" id="context"> }
/**
</pre><pre class="diff"><small id="info">@@ -100,13 +103,7 @@
</small></pre><pre class="diff" id="context">
private DefaultNamespace getNamespace(String typeName) {
String namespaceName = extractNamespaceName(typeName);
</pre><pre class="diff" id="removed">- DefaultNamespace namespace = (DefaultNamespace) _namespacesByName.get(namespaceName);
- if (namespace == null) {
- namespace = new DefaultNamespace(namespaceName);
- _namespacesByName.put(namespaceName, namespace);
- }
-
- return namespace;
</pre><pre class="diff" id="added">+ return (DefaultNamespace) _namespaceLibrary.getNamespace(namespaceName);
</pre><pre class="diff" id="context"> }
private static String extractNamespaceName(String typeName) {
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>NamespaceFactBuilder.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- NamespaceFactBuilder.java 14 Dec 2004 23:55:55 -0000 1.3
+++ NamespaceFactBuilder.java 5 Jan 2005 06:29:43 -0000 1.4
@@ -29,22 +29,22 @@
</small></pre><pre class="diff" id="context"> import java.util.Iterator;
/**
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceFactBuilder.java,v 1.<span id="removedchars">3 2004/12/14 23:55:55</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceFactBuilder.java,v 1.<span id="addedchars">4 2005/01/05 06:29:43</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class NamespaceFactBuilder implements FactBuilder {
private final RuleEngine _ruleEngine;
</pre><pre class="diff" id="removed">- private final TypeLibrary _typeLibrary;
</pre><pre class="diff" id="added">+ private final NamespaceLibrary _namespaceLibrary;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public NamespaceFactBuilder(RuleEngine ruleEngine, <span id="removedchars">TypeLibrary typ</span>eLibrary) {
</pre><pre class="diff" id="added">+ public NamespaceFactBuilder(RuleEngine ruleEngine, <span id="addedchars">NamespaceLibrary namespac</span>eLibrary) {
</pre><pre class="diff" id="context"> _ruleEngine = ruleEngine;
</pre><pre class="diff" id="removed">- _typeLibrary = typeLibrary;
</pre><pre class="diff" id="added">+ _namespaceLibrary = namespaceLibrary;
</pre><pre class="diff" id="context"> }
/**
* Asserts namespace facts.
*/
public void assertObjects() {
</pre><pre class="diff" id="removed">- for (Iterator iterator = _<span id="removedchars">typ</span>eLibrary.getNamespaces().iterator(); iterator.hasNext();) {
</pre><pre class="diff" id="added">+ for (Iterator iterator = _<span id="addedchars">namespac</span>eLibrary.getNamespaces().iterator(); iterator.hasNext();) {
</pre><pre class="diff" id="context"> _ruleEngine.assertObject(iterator.next());
}
}
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins<br /></span>
<div class="fileheader"><big><b>Joodi.java</b></big> <small id="info">1.9 -> 1.10</small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- Joodi.java 23 Dec 2004 12:26:26 -0000 1.9
+++ Joodi.java 5 Jan 2005 06:29:44 -0000 1.10
@@ -38,14 +38,16 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
import java.util.Iterator;
</pre><pre class="diff" id="added">+// CHECKSTYLE OFF au.com.redhillconsulting.jamaica.tools.checkstyle.ClassFanOutComplexityCheck
</pre><pre class="diff" id="context"> /**
</pre><pre class="diff" id="removed">- * @version $Id: Joodi.java,v 1.9 2004/12/23 12:26:26 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Joodi.java,v 1.10 2005/01/05 06:29:44 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class Joodi {
private final Log _log;
private final TypeArchiveLoader _typeLoader;
private final RuleEngine _ruleEngine;
</pre><pre class="diff" id="removed">- private final TypeLibrary _typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ private final NamespaceLibrary _namespaceLibrary = new DefaultNamespaceLibrary();
+ private final TypeLibrary _typeLibrary = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
public Joodi(Log log, ResourceProvider resourceProvider) {
_log = log;
</pre><pre class="diff"><small id="info">@@ -76,7 +78,7 @@
</small></pre><pre class="diff" id="context"> public void run() {
_log.info("Loading setup facts...");
_ruleEngine.assertObject(_typeLibrary);
</pre><pre class="diff" id="removed">- new NamespaceFactBuilder(_ruleEngine, _<span id="removedchars">typ</span>eLibrary).assertObjects();
</pre><pre class="diff" id="added">+ new NamespaceFactBuilder(_ruleEngine, _<span id="addedchars">namespac</span>eLibrary).assertObjects();
</pre><pre class="diff" id="context"> new TypeFactBuilder(_ruleEngine, _typeLibrary).assertObjects();
_log.info("Executing rules...");
</pre><pre class="diff"><small id="info">@@ -98,3 +100,6 @@
</small></pre><pre class="diff" id="context"> }
}
}
</pre><pre class="diff" id="added">+
+// CHECKSTYLE ON au.com.redhillconsulting.jamaica.tools.checkstyle.ClassFanOutComplexityCheck
+
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader" id="added"><big><b>DefaultNamespaceLibraryTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultNamespaceLibraryTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultNamespaceLibraryTest.java 5 Jan 2005 06:29:45 -0000 1.1
@@ -0,0 +1,85 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.parser;
+
+import junit.framework.TestCase;
+import net.sf.joodi.facts.Namespace;
+import net.sf.joodi.facts.DefaultNamespace;
+
+import java.util.Collections;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @version $Id: DefaultNamespaceLibraryTest.java,v 1.1 2005/01/05 06:29:45 adammurdoch Exp $
+ */
+public class DefaultNamespaceLibraryTest extends TestCase {
+ public void testCanGetNamespaceByName() {
+ NamespaceLibrary library = new DefaultNamespaceLibrary();
+
+ Namespace namespace = library.getNamespace("a.b");
+
+ assertTrue(namespace instanceof DefaultNamespace);
+ assertEquals("a.b", namespace.getName());
+ }
+
+ public void testCanGetDefaultNamespace() {
+ NamespaceLibrary library = new DefaultNamespaceLibrary();
+
+ Namespace namespace = library.getNamespace("");
+
+ assertTrue(namespace instanceof DefaultNamespace);
+ assertEquals("", namespace.getName());
+ }
+
+ public void testAddsNamespaceOnFirstReference() {
+ NamespaceLibrary library = new DefaultNamespaceLibrary();
+
+ assertTrue(library.getNamespaces().isEmpty());
+
+ Namespace namespace = library.getNamespace("a.b");
+ assertNotNull(namespace);
+
+ assertEquals(Collections.singleton(namespace), library.getNamespaces());
+ }
+
+ public void testAlwaysReturnsTheSameInstanceOfANamespace() {
+ NamespaceLibrary library = new DefaultNamespaceLibrary();
+
+ Namespace namespace = library.getNamespace("a.b");
+ assertSame(namespace, library.getNamespace("a.b"));
+ }
+
+ public void testCanGetReferencedNamespaces() {
+ NamespaceLibrary library = new DefaultNamespaceLibrary();
+
+ Set expectedNamespaces = new HashSet();
+ expectedNamespaces.add(library.getNamespace("a"));
+ assertEquals(expectedNamespaces, library.getNamespaces());
+
+ expectedNamespaces.add(library.getNamespace("c"));
+ assertEquals(expectedNamespaces, library.getNamespaces());
+ }
+}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibraryTest.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- DefaultTypeLibraryTest.java 5 Jan 2005 04:49:12 -0000 1.5
+++ DefaultTypeLibraryTest.java 5 Jan 2005 06:29:45 -0000 1.6
@@ -26,32 +26,50 @@
</small></pre><pre class="diff" id="context">
import junit.framework.TestCase;
import net.sf.joodi.facts.*;
</pre><pre class="diff" id="removed">-
-import java.util.HashSet;
-import java.util.Set;
</pre><pre class="diff" id="added">+import org.easymock.MockControl;
</pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibraryTest.java,v 1.<span id="removedchars">5 2005/01/05 04:49:12</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibraryTest.java,v 1.<span id="addedchars">6 2005/01/05 06:29:45</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibraryTest extends TestCase {
</pre><pre class="diff" id="added">+ private final MockControl _control = MockControl.createStrictControl(NamespaceLibrary.class);
+ private final NamespaceLibrary _namespaceLibrary = (NamespaceLibrary) _control.getMock();
+ private final DefaultNamespace _defaultNamespace = Fixtures.NAMESPACE_Q;
+ private final DefaultNamespace _namespace = Fixtures.NAMESPACE_P;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ _namespaceLibrary.getNamespace("");
+ _control.setReturnValue(_defaultNamespace);
+ }
</pre><pre class="diff" id="context">
public void testCanAddType() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("a");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.addType("a.A");
assertNotNull(type);
</pre><pre class="diff" id="removed">- assertEquals("a", type.getNamespace().getName());
</pre><pre class="diff" id="added">+ assertSame(_namespace, type.getNamespace());
</pre><pre class="diff" id="context"> assertEquals("a.A", type.getName());
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> public void testCanGetPrimitiveTypesByName() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
assertTrue(library.getType("boolean") instanceof PrimitiveType);
PrimitiveType type = (PrimitiveType) library.getType("boolean");
assertEquals("boolean", type.getName());
</pre><pre class="diff" id="removed">- assertEquals("", type.getNamespace().getName());
</pre><pre class="diff" id="added">+ assertSame(_defaultNamespace, type.getNamespace());
</pre><pre class="diff" id="context">
assertTrue(library.getType("void") instanceof PrimitiveType);
assertTrue(library.getType("short") instanceof PrimitiveType);
</pre><pre class="diff"><small id="info">@@ -61,16 +79,25 @@
</small></pre><pre class="diff" id="context"> assertTrue(library.getType("double") instanceof PrimitiveType);
assertTrue(library.getType("char") instanceof PrimitiveType);
assertTrue(library.getType("byte") instanceof PrimitiveType);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testCanGetObjectTypesByName() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("a");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.getType("a.A");
assertTrue(type instanceof SimpleType);
</pre><pre class="diff" id="removed">- assertEquals("a", type.getNamespace().getName());
</pre><pre class="diff" id="added">+ assertSame(_namespace, type.getNamespace());
</pre><pre class="diff" id="context"> assertEquals("a.A", type.getName());
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
/**
</pre><pre class="diff"><small id="info">@@ -82,56 +109,94 @@
</small></pre><pre class="diff" id="context"> * impact the library itself, by creating new ArrayTypes inside it.
*/
public void testCanGetObjectArrayTypesByName() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("a");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.getType("a.A[]");
assertEquals("a.A", type.getName());
assertSame(library.getType("a.A"), type);
assertSame(library.getType("a.A[][]"), type);
assertSame(library.getType("a.A[][][][][]"), type);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testCanGetPrimitiveArrayTypesByName() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.getType("boolean[]");
assertSame(library.getType("boolean"), type);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testSameTypeNameReturnsSameTypeInstance() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.getType("typeName");
assertNotNull(type);
assertSame(type, library.getType("typeName"));
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- public void testSameNamespaceNameReturnsSameNamespaceInstance() {
- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ public void testNamespaceNameIsExtractedCorrectlyFromFullyQualifiedTypeName() {
+ _namespaceLibrary.getNamespace("");
+ _control.setReturnValue(_defaultNamespace);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Namespace namespace = library.getType("p.a").getNamespace();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("p");
+ DefaultNamespace p = new DefaultNamespace("p");
+ _control.setReturnValue(p);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- assertNotNull(namespace);
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("p.q");
+ DefaultNamespace pq = new DefaultNamespace("p.q");
+ _control.setReturnValue(pq);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- assertSame(namespace, library.getType("p.b").getNamespace());
- assertEquals("p", namespace.getName());
- }
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("p.q.r");
+ DefaultNamespace pqr = new DefaultNamespace("p.q.r");
+ _control.setReturnValue(pqr);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public void testNamespaceNameIsExtractedCorrectlyFromFullyQualifiedTypeName() {
- TypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("crazy/crap-name.A.A");
+ DefaultNamespace badlyNamed = new DefaultNamespace("crazy/crap-name.A.A");
+ _control.setReturnValue(badlyNamed);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- assertEquals("", typeLibrary.getType("A").getNamespace().getName());
- assertEquals("p", typeLibrary.getType("p.A").getNamespace().getName());
- assertEquals("p.q", typeLibrary.getType("p.q.A").getNamespace().getName());
- assertEquals("p.q.r", typeLibrary.getType("p.q.r.A").getNamespace().getName());
- assertEquals("crazy/crap-name.A.A", typeLibrary.getType("crazy/crap-name.A.A.A").getNamespace().getName());
</pre><pre class="diff" id="added">+ _control.replay();
+
+ TypeLibrary typeLibrary = new DefaultTypeLibrary(_namespaceLibrary);
+
+ assertSame(_defaultNamespace, typeLibrary.getType("A").getNamespace());
+ assertSame(p, typeLibrary.getType("p.A").getNamespace());
+ assertSame(pq, typeLibrary.getType("p.q.A").getNamespace());
+ assertSame(pqr, typeLibrary.getType("p.q.r.A").getNamespace());
+ assertSame(badlyNamed, typeLibrary.getType("crazy/crap-name.A.A.A").getNamespace());
+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testTypesWithTheSameNameInDifferentNameSpacesAreDistinct() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("p1");
+ _control.setReturnValue(_namespace);
+
+ _namespaceLibrary.getNamespace("p2");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type t1 = library.getType("p1.A");
Type t2 = library.getType("p2.A");
</pre><pre class="diff"><small id="info">@@ -140,34 +205,36 @@
</small></pre><pre class="diff" id="context"> assertNotNull(t2);
assertNotSame(t1, t2);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testSamePrimitiveTypeReturnsSameInstance() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context">
Type type = library.getType("int");
assertNotNull(type);
assertSame(type, library.getType("int"));
</pre><pre class="diff" id="removed">- }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- public void testCanGetAllReferencedNamespaces() {
- TypeLibrary library = new DefaultTypeLibrary();
-
- Set expectedNamespaces = new HashSet();
- expectedNamespaces.add(library.getType("int").getNamespace());
- assertEquals(expectedNamespaces, library.getNamespaces());
-
- expectedNamespaces.add(library.getType("a.b.C").getNamespace());
- assertEquals(expectedNamespaces, library.getNamespaces());
</pre><pre class="diff" id="added">+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testCanGetAllReferencedTypes() {
</pre><pre class="diff" id="removed">- TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ _namespaceLibrary.getNamespace("a.b");
+ _control.setReturnValue(_namespace);
+
+ _control.replay();
+
+ TypeLibrary library = new DefaultTypeLibrary(_namespaceLibrary);
</pre><pre class="diff" id="context"> assertEquals(9, library.getTypes().size());
Type type = library.getType("a.b.A");
assertTrue(library.getTypes().contains(type));
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>NamespaceFactBuilderTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- NamespaceFactBuilderTest.java 17 Dec 2004 01:55:55 -0000 1.4
+++ NamespaceFactBuilderTest.java 5 Jan 2005 06:29:45 -0000 1.5
@@ -33,29 +33,29 @@
</small></pre><pre class="diff" id="context"> import java.util.Collections;
/**
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceFactBuilderTest.java,v 1.<span id="removedchars">4 2004/12/17 01:55:5</span>5 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceFactBuilderTest.java,v 1.<span id="addedchars">5 2005/01/05 06:29:4</span>5 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class NamespaceFactBuilderTest extends AbstractRuleTestCase {
</pre><pre class="diff" id="removed">- private final MockControl _control = MockControl.createStrictControl(RuleEngineAnd<span id="removedchars">Typ</span>eLibrary.class);
</pre><pre class="diff" id="added">+ private final MockControl _control = MockControl.createStrictControl(RuleEngineAnd<span id="addedchars">Namespac</span>eLibrary.class);
</pre><pre class="diff" id="context"> private final RuleEngine _ruleEngine = (RuleEngine) _control.getMock();
</pre><pre class="diff" id="removed">- private final TypeLibrary _typeLibrary = (TypeLibrary) _control.getMock();
</pre><pre class="diff" id="added">+ private final NamespaceLibrary _namespaceLibrary = (NamespaceLibrary) _control.getMock();
</pre><pre class="diff" id="context">
public void testAssertsAllNamespacesInTypeLibrary() {
Namespace namespace = new DefaultNamespace("a.b");
</pre><pre class="diff" id="removed">- _<span id="removedchars">typ</span>eLibrary.getNamespaces();
</pre><pre class="diff" id="added">+ _<span id="addedchars">namespac</span>eLibrary.getNamespaces();
</pre><pre class="diff" id="context"> _control.setReturnValue(Collections.singleton(namespace));
_ruleEngine.assertObject(namespace);
_control.replay();
</pre><pre class="diff" id="removed">- NamespaceFactBuilder builder = new NamespaceFactBuilder(_ruleEngine, _<span id="removedchars">typ</span>eLibrary);
</pre><pre class="diff" id="added">+ NamespaceFactBuilder builder = new NamespaceFactBuilder(_ruleEngine, _<span id="addedchars">namespac</span>eLibrary);
</pre><pre class="diff" id="context"> builder.assertObjects();
_control.verify();
}
</pre><pre class="diff" id="removed">- public interface RuleEngineAndTypeLibrary extends RuleEngine, TypeLibrary {
</pre><pre class="diff" id="added">+ public interface RuleEngineAndNamespaceLibrary extends RuleEngine, NamespaceLibrary {
</pre><pre class="diff" id="context"> }
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-05 04:49:23
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file1">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">ModelBuildingTypeVisitor.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.6 -> 1.7</td></tr>
<tr><td><tt> /<a href="#file3">TypeLibrary.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.11 -> 1.12</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/parser/<a href="#file4">DefaultTypeLibraryTest.java</a></tt></td><td align="right" id="added">+10</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td><tt> /<a href="#file5">ModelBuildingTypeVisitorTest.java</a></tt></td><td align="right" id="added">+160</td><td align="right" id="removed">-46</td><td nowrap="nowrap" align="center">1.6 -> 1.7</td></tr>
<tr><td></td><td align="right" id="added">+188</td><td align="right" id="removed">-51</td><td></td></tr>
</table>
<small id="info">5 modified files</small><br />
<div class="tasklist"><ul>
<li><a href="#task1">TODO - maybe move the following to an interface that represents a mutable TypeLibrary</a></li>
</ul></div>
<pre class="comment">
Added TypeLibrary.addType(), which the model builder uses to notify the TypeLibrary that it is about to assemble the model for a type.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- DefaultTypeLibrary.java 31 Dec 2004 23:03:27 -0000 1.5
+++ DefaultTypeLibrary.java 5 Jan 2005 04:49:11 -0000 1.6
@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.5 2004/12/31 23:03:27 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.6 2005/01/05 04:49:11 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff"><small id="info">@@ -91,6 +91,13 @@
</small></pre><pre class="diff" id="context"> return type;
}
</pre><pre class="diff" id="added">+ /**
+ * Adds a type to this library.
+ */
+ public Type addType(String typeName) {
+ return getType(typeName);
+ }
+
</pre><pre class="diff" id="context"> private DefaultNamespace getNamespace(String typeName) {
String namespaceName = extractNamespaceName(typeName);
DefaultNamespace namespace = (DefaultNamespace) _namespacesByName.get(namespaceName);
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitor.java</b></big> <small id="info">1.6 -> 1.7</small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- ModelBuildingTypeVisitor.java 5 Jan 2005 03:25:20 -0000 1.6
+++ ModelBuildingTypeVisitor.java 5 Jan 2005 04:49:11 -0000 1.7
@@ -30,7 +30,7 @@
</small></pre><pre class="diff" id="context"> // CHECKSTYLE OFF au.com.redhillconsulting.jamaica.tools.checkstyle.ClassDataAbstractionCouplingCheck
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitor.java,v 1.<span id="removedchars">6 2005/01/05 03:25:20</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitor.java,v 1.<span id="addedchars">7 2005/01/05 04:49:11</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitor implements TypeVisitor {
private final TypeLibrary _typeLibrary;
</pre><pre class="diff"><small id="info">@@ -45,7 +45,7 @@
</small></pre><pre class="diff" id="context">
public void visitType(String name) {
Assert.isTrue(name != null, "name can't be null");
</pre><pre class="diff" id="removed">- _type = (SimpleType) _typeLibrary.<span id="removedchars">get</span>Type(name);
</pre><pre class="diff" id="added">+ _type = (SimpleType) _typeLibrary.<span id="addedchars">add</span>Type(name);
</pre><pre class="diff" id="context"> }
public void visitSuperType(String name) {
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>TypeLibrary.java</b></big> <small id="info">1.11 -> 1.12</small></div>
<pre class="diff"><small id="info">diff -u -r1.11 -r1.12
--- TypeLibrary.java 31 Dec 2004 23:03:27 -0000 1.11
+++ TypeLibrary.java 5 Jan 2005 04:49:11 -0000 1.12
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Set;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TypeLibrary.java,v 1.11 2004/12/31 23:03:27 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeLibrary.java,v 1.12 2005/01/05 04:49:11 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public interface TypeLibrary {
/**
</pre><pre class="diff"><small id="info">@@ -46,4 +46,11 @@
</small></pre><pre class="diff" id="context"> * Returns an object type.
*/
Type getType(String typeName);
</pre><pre class="diff" id="added">+
<a name="task1" />+ // <span class="task">TODO</span> - maybe move the following to an interface that represents a mutable TypeLibrary
+
+ /**
+ * Adds a type to this library.
+ */
+ Type addType(String typeName);
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibraryTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- DefaultTypeLibraryTest.java 31 Dec 2004 23:03:28 -0000 1.4
+++ DefaultTypeLibraryTest.java 5 Jan 2005 04:49:12 -0000 1.5
@@ -32,10 +32,19 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibraryTest.java,v 1.4 2004/12/31 23:03:28 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibraryTest.java,v 1.5 2005/01/05 04:49:12 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibraryTest extends TestCase {
</pre><pre class="diff" id="added">+ public void testCanAddType() {
+ TypeLibrary library = new DefaultTypeLibrary();
+
+ Type type = library.addType("a.A");
+ assertNotNull(type);
+ assertEquals("a", type.getNamespace().getName());
+ assertEquals("a.A", type.getName());
+ }
+
</pre><pre class="diff" id="context"> public void testCanGetPrimitiveTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitorTest.java</b></big> <small id="info">1.6 -> 1.7</small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- ModelBuildingTypeVisitorTest.java 5 Jan 2005 03:25:20 -0000 1.6
+++ ModelBuildingTypeVisitorTest.java 5 Jan 2005 04:49:12 -0000 1.7
@@ -27,33 +27,62 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.facts.*;
import net.sf.joodi.rules.AbstractRuleTestCase;
import net.sf.joodi.util.UnhandledException;
</pre><pre class="diff" id="added">+import org.easymock.MockControl;
</pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.<span id="removedchars">6 2005/01/05 03:25:20</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.<span id="addedchars">7 2005/01/05 04:49:12</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitorTest extends AbstractRuleTestCase {
</pre><pre class="diff" id="added">+ private final MockControl _control = MockControl.createStrictControl(TypeLibrary.class);
+ private final TypeLibrary _typeLibrary = (TypeLibrary) _control.getMock();
+
+ public void testAddsTypeOnVisit() {
+ _typeLibrary.addType("A");
+ _control.setReturnValue(Fixtures.createType("a", "A"));
+
+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
+ visitor.visitType("A");
+
+ _control.verify();
+ }
</pre><pre class="diff" id="context">
public void testAddsTypeUseOnSuperType() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type superType = typeLibrary.getType("B");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type superType = Fixtures.createType("a", "B");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(superType);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitSuperType("B");
assertTrue(type.isSubTypeOf(superType) instanceof DirectExtension);
assertTrue(type.usesType(superType) instanceof DirectExtension);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnReturnTypeOfOperation() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type other = typeLibrary.getType("B");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "B");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(other);
+
+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
</pre><pre class="diff"><small id="info">@@ -62,14 +91,22 @@
</small></pre><pre class="diff" id="context"> ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
assertTrue(use.getOperation().getClass() == Operation.class);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnReturnTypeOfConstructor() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type other = typeLibrary.getType("void");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("", "void");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("void");
+ _control.setReturnValue(other);
+
+ _control.replay();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="addedchars">_</span>typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("<init>", "<init>()", "void");
</pre><pre class="diff"><small id="info">@@ -78,14 +115,22 @@
</small></pre><pre class="diff" id="context"> ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
assertTrue(use.getOperation().getClass() == Constructor.class);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnReturnTypeOfStaticInitialiser() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type other = typeLibrary.getType("void");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("", "void");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("void");
+ _control.setReturnValue(other);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("<clinit>", "<clinit>()", "void");
</pre><pre class="diff"><small id="info">@@ -94,38 +139,62 @@
</small></pre><pre class="diff" id="context"> ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
assertTrue(use.getOperation().getClass() == StaticInitialiser.class);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnParameterOfOperation() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type other = typeLibrary.getType("C");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "C");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(other);
+
+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitParameter("C");
assertTrue(type.usesType(other) instanceof ParameterTypeUse);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnOperationThrowable() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
- Type type = typeLibrary.getType("A");
- Type other = typeLibrary.getType("C");
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "C");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(other);
+
+ _control.replay();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff" id="added">+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="addedchars">_</span>typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitThrowable("C");
assertTrue(type.usesType(other) instanceof ThrowableTypeUse);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testCannotStartOperationWithoutStartingType() {
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(new DefaultTypeLibrary());
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
try {
visitor.visitOperation("A", "B", "C");
</pre><pre class="diff"><small id="info">@@ -133,79 +202,124 @@
</small></pre><pre class="diff" id="context"> } catch (UnhandledException e) {
assertEquals("_type can't be null", e.getMessage());
}
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseForField() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type fieldType = Fixtures.createType("a", "B");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(fieldType);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Type type = library.getType("A");
- Type fieldType = library.getType("B");
</pre><pre class="diff" id="added">+ _control.replay();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="removedchars">l</span>ibrary);
</pre><pre class="diff" id="added">+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="addedchars">_typeL</span>ibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitField("field", "B");
assertTrue(type.usesType(fieldType) instanceof Field);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseForLocalVariable() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type varType = Fixtures.createType("a", "C");
+
+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(varType);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Type type = library.getType("A");
- Type varType = library.getType("C");
</pre><pre class="diff" id="added">+ _control.replay();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="removedchars">l</span>ibrary);
</pre><pre class="diff" id="added">+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(<span id="addedchars">_typeL</span>ibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitLocalVariable("localVar", "C");
assertTrue(type.usesType(varType) instanceof LocalVariable);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseForStaticOperationUse() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "C");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Type type = library.getType("A");
- Type other = library.getType("C");
</pre><pre class="diff" id="added">+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(other);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitStaticOperationUse("C", "someStaticMethod");
assertTrue(type.usesType(other) instanceof StaticOperationTypeUse);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseForStaticFieldUse() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "C");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Type type = library.getType("A");
- Type other = library.getType("C");
</pre><pre class="diff" id="added">+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(other);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitStaticFieldUse("C", "someStaticMethod");
assertTrue(type.usesType(other) instanceof StaticFieldTypeUse);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseForObjectInstantiation() {
</pre><pre class="diff" id="removed">- DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="added">+ Type type = Fixtures.createType("a", "A");
+ Type other = Fixtures.createType("a", "C");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- Type type = library.getType("A");
- Type other = library.getType("C");
</pre><pre class="diff" id="added">+ _typeLibrary.addType("A");
+ _control.setReturnValue(type);
+ _typeLibrary.getType("B");
+ _control.setReturnValue(Fixtures.createType("a", "B"));
+ _typeLibrary.getType("C");
+ _control.setReturnValue(other);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff" id="added">+ _control.replay();
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(_typeLibrary);
</pre><pre class="diff" id="context">
visitor.visitType("A");
visitor.visitOperation("doStuff", "doStuff()", "B");
visitor.visitObjectInstantiation("C");
assertTrue(type.usesType(other) instanceof InstantiationTypeUse);
</pre><pre class="diff" id="added">+
+ _control.verify();
</pre><pre class="diff" id="context"> }
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-05 03:25:29
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1"><span id="added">Constructor.java</span></a></tt></td><td align="right" id="added">+38</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2"><span id="added">StaticInitialiser.java</span></a></tt></td><td align="right" id="added">+38</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file3">ModelBuildingTypeVisitor.java</a></tt></td><td align="right" id="added">+13</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file4"><span id="added">ConstructorTest.java</span></a></tt></td><td align="right" id="added">+37</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file5"><span id="added">OperationTest.java</span></a></tt></td><td align="right" id="added">+37</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file6"><span id="added">StaticInitialiserTest.java</span></a></tt></td><td align="right" id="added">+37</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file7">Fixtures.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.10 -> 1.11</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/parser/<a href="#file8">ModelBuildingTypeVisitorTest.java</a></tt></td><td align="right" id="added">+36</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr><td></td><td align="right" id="added">+239</td><td align="right" id="removed">-5</td><td></td></tr>
</table>
<small id="info">5 added + 3 modified, total 8 files</small><br />
<pre class="comment">
Added Constructor and StaticInitialiser subclasses of Operation.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>Constructor.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N Constructor.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Constructor.java 5 Jan 2005 03:25:19 -0000 1.1
@@ -0,0 +1,38 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+/**
+ * @version $Id: Constructor.java,v 1.1 2005/01/05 03:25:19 adammurdoch Exp $
+ */
+public class Constructor extends Operation {
+ public Constructor(Type declaringType, String signature, Type returnType) {
+ super(declaringType, "<init>", signature, returnType);
+ }
+
+ public String toString() {
+ return "Constructor " + getDeclaringType() + "()";
+ }
+}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>StaticInitialiser.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N StaticInitialiser.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ StaticInitialiser.java 5 Jan 2005 03:25:19 -0000 1.1
@@ -0,0 +1,38 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+/**
+ * @version $Id: StaticInitialiser.java,v 1.1 2005/01/05 03:25:19 adammurdoch Exp $
+ */
+public class StaticInitialiser extends Operation {
+ public StaticInitialiser(Type declaringType, String signature, Type returnType) {
+ super(declaringType, "<clinit>", signature, returnType);
+ }
+
+ public String toString() {
+ return "Static initialiser of " + getDeclaringType();
+ }
+}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitor.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- ModelBuildingTypeVisitor.java 31 Dec 2004 23:03:27 -0000 1.5
+++ ModelBuildingTypeVisitor.java 5 Jan 2005 03:25:20 -0000 1.6
@@ -27,9 +27,10 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.facts.*;
import net.sf.joodi.util.Assert;
</pre><pre class="diff" id="added">+// CHECKSTYLE OFF au.com.redhillconsulting.jamaica.tools.checkstyle.ClassDataAbstractionCouplingCheck
</pre><pre class="diff" id="context"> /**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitor.java,v 1.5 2004/12/31 23:03:27 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitor.java,v 1.6 2005/01/05 03:25:20 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitor implements TypeVisitor {
private final TypeLibrary _typeLibrary;
</pre><pre class="diff"><small id="info">@@ -57,8 +58,15 @@
</small></pre><pre class="diff" id="context">
public void visitOperation(String name, String signature, String returnTypeName) {
Assert.isTrue(_type != null, "_type can't be null");
</pre><pre class="diff" id="added">+ Assert.isTrue(name != null, "name can't be null");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- _operation = new Operation(_type, name, signature, _typeLibrary.getType(returnTypeName));
</pre><pre class="diff" id="added">+ if (name.equals("<init>")) {
+ _operation = new Constructor(_type, signature, _typeLibrary.getType(returnTypeName));
+ } else if (name.equals("<clinit>")) {
+ _operation = new StaticInitialiser(_type, signature, _typeLibrary.getType(returnTypeName));
+ } else {
+ _operation = new Operation(_type, name, signature, _typeLibrary.getType(returnTypeName));
+ }
</pre><pre class="diff" id="context">
_type.addTypeUse(new ReturnTypeUse(_operation));
}
</pre><pre class="diff"><small id="info">@@ -90,4 +98,6 @@
</small></pre><pre class="diff" id="context"> public void visitObjectInstantiation(String typeName) {
_type.addTypeUse(new InstantiationTypeUse(_operation, _typeLibrary.getType(typeName)));
}
</pre><pre class="diff" id="removed">-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre><pre class="diff" id="added">+}
+
+// CHECKSTYLE ON au.com.redhillconsulting.jamaica.tools.checkstyle.ClassDataAbstractionCouplingCheck
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>ConstructorTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N ConstructorTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ConstructorTest.java 5 Jan 2005 03:25:20 -0000 1.1
@@ -0,0 +1,37 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Id: ConstructorTest.java,v 1.1 2005/01/05 03:25:20 adammurdoch Exp $
+ */
+public class ConstructorTest extends TestCase {
+ public void testConstructorHasUsefulStringRepresentation() {
+ Constructor constructor = new Constructor(Fixtures.TYPE_A, "<init>(int)", Fixtures.VOID);
+ assertEquals("Constructor " + Fixtures.TYPE_A.getName() + "()", constructor.toString());
+ }
+}
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>OperationTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N OperationTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ OperationTest.java 5 Jan 2005 03:25:20 -0000 1.1
@@ -0,0 +1,37 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Id: OperationTest.java,v 1.1 2005/01/05 03:25:20 adammurdoch Exp $
+ */
+public class OperationTest extends TestCase {
+ public void testOperationHasUsefulStringRepresentation() {
+ Operation operation = new Operation(Fixtures.TYPE_A, "operation", "operation(int)", Fixtures.TYPE_A);
+ assertEquals("Operation " + Fixtures.TYPE_A.getName() + ".operation()", operation.toString());
+ }
+}
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>StaticInitialiserTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N StaticInitialiserTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ StaticInitialiserTest.java 5 Jan 2005 03:25:20 -0000 1.1
@@ -0,0 +1,37 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Id: StaticInitialiserTest.java,v 1.1 2005/01/05 03:25:20 adammurdoch Exp $
+ */
+public class StaticInitialiserTest extends TestCase {
+ public void testInitialiserHasUsefulStringRepresentation() {
+ StaticInitialiser initialiser = new StaticInitialiser(Fixtures.TYPE_A, "<clinit>()", Fixtures.VOID);
+ assertEquals("Static initialiser of " + Fixtures.TYPE_A.getName(), initialiser.toString());
+ }
+}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Fixtures.java</b></big> <small id="info">1.10 -> 1.11</small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- Fixtures.java 31 Dec 2004 23:47:49 -0000 1.10
+++ Fixtures.java 5 Jan 2005 03:25:20 -0000 1.11
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: Fixtures.java,v 1.10 2004/12/31 23:47:49 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Fixtures.java,v 1.11 2005/01/05 03:25:20 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public final class Fixtures {
public static final DefaultNamespace NAMESPACE_P = new DefaultNamespace("namespaceP");
</pre><pre class="diff"><small id="info">@@ -36,6 +36,8 @@
</small></pre><pre class="diff" id="context"> public static final DefaultNamespace NAMESPACE_R = new DefaultNamespace("namespaceR");
public static final DefaultNamespace NAMESPACE_S = new DefaultNamespace("namespaceS");
</pre><pre class="diff" id="added">+ public static final Type VOID = new PrimitiveType("void", new DefaultNamespace(""));
+
</pre><pre class="diff" id="context"> public static final Type TYPE_A = new SimpleType("typeA", NAMESPACE_P);
public static final Type TYPE_A1 = new SimpleType("typeA1", NAMESPACE_P);
public static final Type TYPE_B = new SimpleType("typeB", NAMESPACE_Q);
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitorTest.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- ModelBuildingTypeVisitorTest.java 31 Dec 2004 23:03:28 -0000 1.5
+++ ModelBuildingTypeVisitorTest.java 5 Jan 2005 03:25:20 -0000 1.6
@@ -30,7 +30,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.5 2004/12/31 23:03:28 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.6 2005/01/05 03:25:20 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitorTest extends AbstractRuleTestCase {
</pre><pre class="diff"><small id="info">@@ -59,6 +59,41 @@
</small></pre><pre class="diff" id="context"> visitor.visitOperation("doStuff", "doStuff()", "B");
assertTrue(type.usesType(other) instanceof ReturnTypeUse);
</pre><pre class="diff" id="added">+ ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
+
+ assertTrue(use.getOperation().getClass() == Operation.class);
+ }
+
+ public void testAddsTypeUseOnReturnTypeOfConstructor() {
+ DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
+ Type type = typeLibrary.getType("A");
+ Type other = typeLibrary.getType("void");
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
+
+ visitor.visitType("A");
+ visitor.visitOperation("<init>", "<init>()", "void");
+
+ assertTrue(type.usesType(other) instanceof ReturnTypeUse);
+ ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
+
+ assertTrue(use.getOperation().getClass() == Constructor.class);
+ }
+
+ public void testAddsTypeUseOnReturnTypeOfStaticInitialiser() {
+ DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
+ Type type = typeLibrary.getType("A");
+ Type other = typeLibrary.getType("void");
+
+ ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
+
+ visitor.visitType("A");
+ visitor.visitOperation("<clinit>", "<clinit>()", "void");
+
+ assertTrue(type.usesType(other) instanceof ReturnTypeUse);
+ ReturnTypeUse use = (ReturnTypeUse) type.usesType(other);
+
+ assertTrue(use.getOperation().getClass() == StaticInitialiser.class);
</pre><pre class="diff" id="context"> }
public void testAddsTypeUseOnParameterOfOperation() {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-05 03:24:28
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/main/net/sf/joodi/plugins/ant</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">JoodiTask.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
</table>
<pre class="comment">
Fail build if any notifications are asserted.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins/ant<br /></span>
<div class="fileheader"><big><b>JoodiTask.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- JoodiTask.java 4 Jan 2005 02:12:26 -0000 1.4
+++ JoodiTask.java 5 Jan 2005 03:24:18 -0000 1.5
@@ -25,6 +25,7 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.plugins.ant;
import net.sf.joodi.plugins.Joodi;
</pre><pre class="diff" id="added">+import net.sf.joodi.plugins.NotificationListener;
</pre><pre class="diff" id="context"> import net.sf.joodi.reporting.FileReportDestination;
import net.sf.joodi.reporting.FileReportWriter;
import net.sf.joodi.util.ClassLoaderResourceProvider;
</pre><pre class="diff"><small id="info">@@ -40,7 +41,7 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: JoodiTask.java,v 1.<span id="removedchars">4 2005/01/04 02:12:26</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: JoodiTask.java,v 1.<span id="addedchars">5 2005/01/05 03:24:18</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class JoodiTask extends Task {
private static final Log LOG = LogFactory.getLog(JoodiTask.class);
</pre><pre class="diff"><small id="info">@@ -89,5 +90,11 @@
</small></pre><pre class="diff" id="context"> joodi.run();
joodi.runReport(new FileReportWriter(new FileReportDestination(_report), resourceProvider, true));
</pre><pre class="diff" id="added">+
+ NotificationListener listener = new NotificationListener();
+ joodi.runReport(listener);
+ if (listener.hasNotifications()) {
+ throw new BuildException("Inspection finished with " + listener.getNotificationCount() + " notifications.");
+ }
</pre><pre class="diff" id="context"> }
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2005-01-04 20:38:24
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1"><span id="added">ScalarTypeReference.java</span></a></tt></td><td align="right" id="added">+76</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2"><span id="added">TypeReference.java</span></a></tt></td><td align="right" id="added">+50</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt>test/net/sf/joodi/facts/<a href="#file3"><span id="added">ScalarTypeReferenceTest.java</span></a></tt></td><td align="right" id="added">+66</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td></td><td align="right" id="added">+192</td><td></td><td></td></tr>
</table>
<small id="info">3 added files</small><br />
<pre class="comment">
New concept of TypeReference created but not yet used.
ArrayTypeReference to follow soon.
RHS of TypeUse will then become a TypeReference, not just a Type.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>ScalarTypeReference.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N ScalarTypeReference.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ScalarTypeReference.java 4 Jan 2005 20:38:07 -0000 1.1
@@ -0,0 +1,76 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import net.sf.joodi.util.Assert;
+
+/**
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: ScalarTypeReference.java,v 1.1 2005/01/04 20:38:07 jimmyjazz Exp $
+ */
+public class ScalarTypeReference implements TypeReference {
+ private final Type _type;
+
+ public ScalarTypeReference(Type type) {
+ Assert.isTrue(type != null, "type can't be null");
+
+ _type = type;
+ }
+
+ public boolean isArray() {
+ return false;
+ }
+
+ public int getArrayDimensions() {
+ return 0;
+ }
+
+ public Type getReferencedType() {
+ return _type;
+ }
+
+ /**
+ * Equality is based on the referenced type being the same object
+ * instance as the one referenced by this object. Of course, the other
+ * object must also be a scalar reference.
+ * @param obj the object to test.
+ * @return true if the other scalar reference is to the same {@link Type} instance.
+ */
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+
+ if (!(obj instanceof ScalarTypeReference)) {
+ return false;
+ }
+
+ return _type == ((ScalarTypeReference) obj).getReferencedType();
+ }
+
+ public int hashCode() {
+ return _type.hashCode();
+ }
+}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>TypeReference.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N TypeReference.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ TypeReference.java 4 Jan 2005 20:38:09 -0000 1.1
@@ -0,0 +1,50 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+/**
+ * This interface represents a reference to a {@link Type} that can be either a direct
+ * scalar reference or an array reference. This can be used, for example, to distinguish
+ * between a return type that is a simple String and an array of String objects.
+ *
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: TypeReference.java,v 1.1 2005/01/04 20:38:09 jimmyjazz Exp $
+ */
+public interface TypeReference {
+ /**
+ * @return the {@link Type} being referenced.
+ */
+ Type getReferencedType();
+
+ /**
+ * @return true if the {@link Type} is being referenced in an array context.
+ */
+ boolean isArray();
+
+ /**
+ * @return the number of array dimensions in this reference; zero for a simple scalar reference.
+ */
+ int getArrayDimensions();
+}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>ScalarTypeReferenceTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N ScalarTypeReferenceTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ScalarTypeReferenceTest.java 4 Jan 2005 20:38:11 -0000 1.1
@@ -0,0 +1,66 @@
</small></pre><pre class="diff" id="added">+/*
+ * The RedHill Consulting, Pty. Ltd. Software License, Version 1.0
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistribution and use in source or binary forms IS NOT PERMITTED
+ * without prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:ja...@ca...">James Ross</a>
+ * @version $Id: ScalarTypeReferenceTest.java,v 1.1 2005/01/04 20:38:11 jimmyjazz Exp $
+ */
+public class ScalarTypeReferenceTest extends TestCase {
+ private static final DefaultNamespace NAMESPACE = new DefaultNamespace("a.b");
+
+ public void testIsATypeReference() {
+ assertTrue(TypeReference.class.isAssignableFrom(ScalarTypeReference.class));
+ }
+
+ public void testScalarTypeReferenceIsNotAnArray() {
+ TypeReference reference = new ScalarTypeReference(new SimpleType("a.b.c", NAMESPACE));
+ assertFalse(reference.isArray());
+ assertEquals(0, reference.getArrayDimensions());
+ }
+
+ public void testTypePassedInConstructorIsReferencedType() {
+ final SimpleType type = new SimpleType("a.b.c", NAMESPACE);
+ TypeReference reference = new ScalarTypeReference(type);
+ assertSame(type, reference.getReferencedType());
+ }
+
+ public void testTwoScalarTypeReferencesToTheSameTypeObjectAreEqual() {
+ final SimpleType type = new SimpleType("a.b.c", NAMESPACE);
+
+ ScalarTypeReference reference1 = new ScalarTypeReference(type);
+ ScalarTypeReference reference2 = new ScalarTypeReference(type);
+
+ assertTrue(reference1.equals(reference2));
+ }
+
+ public void testTwoScalarTypeReferencesToTypesWithTheSameNameAreNotEqual() {
+ final String typeName = "a.b.c";
+
+ ScalarTypeReference reference1 = new ScalarTypeReference(new SimpleType(typeName, NAMESPACE));
+ ScalarTypeReference reference2 = new ScalarTypeReference(new SimpleType(typeName, NAMESPACE));
+
+ assertFalse(reference1.equals(reference2));
+ }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-04 03:14:52
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>doc/<a href="#file1"><span id="added">command-line-output.xml</span></a></tt></td><td align="right" id="added">+36</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2"><span id="added">run-from-ant.xml</span></a></tt></td><td align="right" id="added">+11</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file3">user-guide.xml</a></tt></td><td align="right" id="added">+9</td><td align="right" id="removed">-48</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr class="alt"><td><tt>etc/<a href="#file4">xmlbook-html.xsl</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr><td><tt> /<a href="#file5">xmlbook.dtd</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td></td><td align="right" id="added">+63</td><td align="right" id="removed">-58</td><td></td></tr>
</table>
<small id="info">2 added + 3 modified, total 5 files</small><br />
<pre class="comment">
- Tidied up generation of section numbers.
- Include listings from external files.
- Added details of ant task to user guide.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/doc<br /></span>
<div class="fileheader" id="added"><big><b>command-line-output.xml</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N command-line-output.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ command-line-output.xml 4 Jan 2005 03:14:41 -0000 1.1
@@ -0,0 +1,36 @@
</small></pre><pre class="diff" id="added">+<listing>
+Java-based Object-Oriented Design Inferometer 0.1 - http://www.sf.net/projects/joodi
+Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+
+(0 ) Starting
+(null: 24, 57): cvc-elt.1: Cannot find the declaration of element 'rule-set'.
+(2093 ) Loading classes from c:/j2sdk1.4.2_03/jre/lib/rt.jar...
+(2123 ) Loading zip: c:/j2sdk1.4.2_03/jre/lib/rt.jar
+(2183 ) Loading class: com/sun/accessibility/internal/resources/accessibility.class
+(2523 ) Loading class: com/sun/accessibility/internal/resources/accessibility_de.class
+(2613 ) Loading class: com/sun/accessibility/internal/resources/accessibility_en.class
+(2693 ) Loading class: com/sun/accessibility/internal/resources/accessibility_es.class
+(2754 ) Loading class: com/sun/accessibility/internal/resources/accessibility_fr.class
+(2834 ) Loading class: com/sun/accessibility/internal/resources/accessibility_it.class
+(2904 ) Loading class: com/sun/accessibility/internal/resources/accessibility_ja.class
+(2914 ) Loading class: com/sun/accessibility/internal/resources/accessibility_ko.class
+(2924 ) Loading class: com/sun/accessibility/internal/resources/accessibility_sv.class
+(2934 ) Loading class: com/sun/accessibility/internal/resources/accessibility_zh_CN.class
+(3034 ) Loading class: com/sun/accessibility/internal/resources/accessibility_zh_TW.class
+(3144 ) Loading class: com/sun/corba/se/ActivationIDL/Activator.class
+(3154 ) Loading class: com/sun/corba/se/ActivationIDL/ActivatorHelper.class
+...
+...
+(108776) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI$TreeSelectionHandler.class
+(108786) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI$TreeTransferHandler.class
+(108786) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI.class
+(109197) Loading class: com/sun/java/swing/plaf/gtk/SynthUI.class
+(109197) Loading class: com/sun/java/swing/plaf/gtk/SynthViewportUI.class
+(109217) Loading class: com/sun/java/swing/plaf/gtk/TabContext.class
+(109217) Loading class: com/sun/java/swing/plaf/gtk/XColors$XColor.class
+(109217) Loading class: com/sun/java/swing/plaf/gtk/XColors.class
+(109367) Loading setup facts...
+(111059) Executing rules...
+(111720) Running report...
+(113633) Finished with 346 violations
+</listing>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/doc<br /></span>
<div class="fileheader" id="added"><big><b>run-from-ant.xml</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N run-from-ant.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ run-from-ant.xml 4 Jan 2005 03:14:41 -0000 1.1
@@ -0,0 +1,11 @@
</small></pre><pre class="diff" id="added">+<listing><![CDATA[
+<taskdef name="joodi" classname="net.sf.joodi.plugins.ant.JoodiTask">
+ <classpath>
+ <fileset dir="${joodi.install.dir}" includes="**/*.jar"/>
+ </classpath>
+</taskdef>
+<joodi report="build/joodi-report.html">
+ <path location="build/my-application.jar"/>
+ <path location="build/classes"/>
+</joodi>
+]]></listing>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/doc<br /></span>
<div class="fileheader"><big><b>user-guide.xml</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- user-guide.xml 25 Dec 2004 11:30:04 -0000 1.7
+++ user-guide.xml 4 Jan 2005 03:14:41 -0000 1.8
@@ -1,6 +1,6 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: user-guide.xml,v 1.7 2004/12/25 11:30:04 jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: user-guide.xml,v 1.8 2005/01/04 03:14:41 adammurdoch Exp $ -->
</pre><pre class="diff" id="context">
<?xml-stylesheet type="text/xsl" href="../etc/xmlbook-html.xsl"?>
</pre><pre class="diff"><small id="info">@@ -71,43 +71,7 @@
</small></pre><pre class="diff" id="context"> <section title="Analysing a single jar" refid="runsinglejar">
<p>To analyse an application packaged in <code>foo.jar</code> and produce a html report named <code>joodi-foo.html</code>, use the following command: <command>java -jar joodi.jar --out joodi-foo.html foo.jar</command></p>
<p>You will see output as joodi loads each class file into the rule engine, then executes the rules, and finally finishes processing. Each line of output produced by joodi has the elapsed time in milliseconds displayed at the start of the line. The following figure shows the (edited) output produced when analysing <code>rt.jar</code>.</p>
</pre><pre class="diff" id="removed">- <listing refid="ant"><![CDATA[
-
- Java-based Object-Oriented Design Inferometer 0.1 - http://www.sf.net/projects/joodi
- Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
-
- (0 ) Starting
- (null: 24, 57): cvc-elt.1: Cannot find the declaration of element 'rule-set'.
- (2093 ) Loading classes from c:/j2sdk1.4.2_03/jre/lib/rt.jar...
- (2123 ) Loading zip: c:/j2sdk1.4.2_03/jre/lib/rt.jar
- (2183 ) Loading class: com/sun/accessibility/internal/resources/accessibility.class
- (2523 ) Loading class: com/sun/accessibility/internal/resources/accessibility_de.class
- (2613 ) Loading class: com/sun/accessibility/internal/resources/accessibility_en.class
- (2693 ) Loading class: com/sun/accessibility/internal/resources/accessibility_es.class
- (2754 ) Loading class: com/sun/accessibility/internal/resources/accessibility_fr.class
- (2834 ) Loading class: com/sun/accessibility/internal/resources/accessibility_it.class
- (2904 ) Loading class: com/sun/accessibility/internal/resources/accessibility_ja.class
- (2914 ) Loading class: com/sun/accessibility/internal/resources/accessibility_ko.class
- (2924 ) Loading class: com/sun/accessibility/internal/resources/accessibility_sv.class
- (2934 ) Loading class: com/sun/accessibility/internal/resources/accessibility_zh_CN.class
- (3034 ) Loading class: com/sun/accessibility/internal/resources/accessibility_zh_TW.class
- (3144 ) Loading class: com/sun/corba/se/ActivationIDL/Activator.class
- (3154 ) Loading class: com/sun/corba/se/ActivationIDL/ActivatorHelper.class
- ...
- ...
- (108776) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI$TreeSelectionHandler.class
- (108786) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI$TreeTransferHandler.class
- (108786) Loading class: com/sun/java/swing/plaf/gtk/SynthTreeUI.class
- (109197) Loading class: com/sun/java/swing/plaf/gtk/SynthUI.class
- (109197) Loading class: com/sun/java/swing/plaf/gtk/SynthViewportUI.class
- (109217) Loading class: com/sun/java/swing/plaf/gtk/TabContext.class
- (109217) Loading class: com/sun/java/swing/plaf/gtk/XColors$XColor.class
- (109217) Loading class: com/sun/java/swing/plaf/gtk/XColors.class
- (109367) Loading setup facts...
- (111059) Executing rules...
- (111720) Running report...
- (113633) Finished with 346 violations
- ]]></listing>
</pre><pre class="diff" id="added">+ <listing refid="commandlineoutput" url="command-line-output.xml"></listing>
</pre><pre class="diff" id="context"> </section>
<section title="Analysing a set of jars" refid="runmultiplejar">
<p>The easiest way to analyse multiple <code>jars</code> or directories is to pass them as trailing arguments to joodi:<command>java -jar joodi.jar --out joodi-foo.html foo.jar bar.jar mybuild/classes</command></p>
</pre><pre class="diff"><small id="info">@@ -115,16 +79,13 @@
</small></pre><pre class="diff" id="context"> <p>Either method will analyse all the class files in all the <code>jars</code> as if they were in a single <code>jar</code>.</p>
</section>
<section title="Running from an Ant build" refid="runningfromant">
</pre><pre class="diff" id="removed">- <p>You can use the <ref id="ant"/> <code>&lt;java&gt;</code> task to run joodi from your Ant build. Below is an example:</p>
- <listing refid="ant"><![CDATA[
- <java fork="yes" jar="${joodi-jar}" failonerror="yes">
- <arg value="--out"/>
- <arg file="report.html"/>
- <arg file="build/classes"/>
- <arg file="build/test-classes"/>
- </java>
- ]]></listing>
- <p>There is no Joodi Ant task yet. Contributions are always welcome.</p>
</pre><pre class="diff" id="added">+ <p>The joodi distribution includes an <ref id="ant"/> task that you can use to run joodi from your build. Below is an example demonstrating how to use the task:</p>
+ <listing refid="runfromant" url="run-from-ant.xml"></listing>
+ <p>Before you can use the joodi task in your build, you should define the task using <code>&lt;taskdef&gt;</code>.
+ Note that you should include all the jars from the distribution in the classpath used to define the task (see the example above).</p>
+ <p>The task takes a <code>report</code> attribute, which specifies where the report should be written to.
+ The task also take one or more nested <code>&lt;path&gt;</code> elements, which specify the jars and directores
+ that contain the classes to inspect.</p>
</pre><pre class="diff" id="context"> </section>
</section>
</section>
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/etc<br /></span>
<div class="fileheader"><big><b>xmlbook-html.xsl</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- xmlbook-html.xsl 25 Dec 2004 11:30:04 -0000 1.5
+++ xmlbook-html.xsl 4 Jan 2005 03:14:42 -0000 1.6
@@ -1,5 +1,5 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: xmlbook-html.xsl,v 1.5 2004/12/25 11:30:04 jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: xmlbook-html.xsl,v 1.6 2005/01/04 03:14:42 adammurdoch Exp $ -->
</pre><pre class="diff" id="context">
<xsl:stylesheet
version="1.0"
</pre><pre class="diff"><small id="info">@@ -46,7 +46,7 @@
</small></pre><pre class="diff" id="context"> <xsl:for-each select="/document/section">
<li>
<a><xsl:attribute name="href">#<xsl:value-of select="@refid"/></xsl:attribute>
</pre><pre class="diff" id="removed">- <dt><xsl:<span id="removedchars">value-of select="position()"/>.</span></dt><dd><xsl:value-of select="@title"/></dd>
</pre><pre class="diff" id="added">+ <dt><xsl:<span id="addedchars">number select="section" format="1."/></span></dt><dd><xsl:value-of select="@title"/></dd>
</pre><pre class="diff" id="context"> </a>
</li>
</xsl:for-each>
</pre><pre class="diff"><small id="info">@@ -55,18 +55,14 @@
</small></pre><pre class="diff" id="context"> </xsl:template>
<xsl:template match="section">
</pre><pre class="diff" id="removed">- <xsl:param name="parent-id"/>
- <xsl:variable name="my-id" select="concat($parent-id, 1 + count(preceding-sibling::section))"/>
</pre><pre class="diff" id="context"> <xsl:variable name="elementname" select="concat('h', count(ancestor::section) + 2)"/>
<a><xsl:attribute name="name"><xsl:value-of select="@refid"/></xsl:attribute></a>
<xsl:element name="{$elementname}">
</pre><pre class="diff" id="removed">- <xsl:<span id="removedchars">value-of select="$my-id</span>"/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
</pre><pre class="diff" id="added">+ <xsl:<span id="addedchars">number level="multiple" count="section</span>"/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
</pre><pre class="diff" id="context"> <xsl:value-of select="@title"/>
</xsl:element>
</pre><pre class="diff" id="removed">- <xsl:apply-templates>
- <xsl:with-param name="parent-id" select="concat($my-id, '.')"/>
- </xsl:apply-templates>
</pre><pre class="diff" id="added">+ <xsl:apply-templates/>
</pre><pre class="diff" id="context"> </xsl:template>
<xsl:template match="code">
</pre><pre class="diff"><small id="info">@@ -122,7 +118,7 @@
</small></pre><pre class="diff" id="context"> <xsl:template match="listing">
<a><xsl:attribute name="name"><xsl:value-of select="@refid"/></xsl:attribute></a>
<p><blockquote>
</pre><pre class="diff" id="removed">- <pre><xsl:apply-templates/></pre>
</pre><pre class="diff" id="added">+ <pre><xsl:value-of select="document(@url, /)/listing"/></pre>
</pre><pre class="diff" id="context"> </blockquote></p>
</xsl:template>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/etc<br /></span>
<div class="fileheader"><big><b>xmlbook.dtd</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- xmlbook.dtd 25 Dec 2004 11:30:04 -0000 1.3
+++ xmlbook.dtd 4 Jan 2005 03:14:42 -0000 1.4
@@ -1,4 +1,4 @@
</small></pre><pre class="diff" id="removed">-<!-- $Id: xmlbook.dtd,v 1.3 2004/12/25 11:30:04 jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: xmlbook.dtd,v 1.4 2005/01/04 03:14:42 adammurdoch Exp $ -->
</pre><pre class="diff" id="context">
<!ELEMENT document (section)*>
</pre><pre class="diff"><small id="info">@@ -44,6 +44,7 @@
</small></pre><pre class="diff" id="context">
<!ATTLIST listing
refid ID #REQUIRED
</pre><pre class="diff" id="added">+ url CDATA #REQUIRED
</pre><pre class="diff" id="context"> >
<!ELEMENT figure (#PCDATA)>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2005-01-04 02:12:36
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/plugins/ant/<a href="#file1">JoodiTask.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt><a href="#file2">build.xml</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.14 -> 1.15</td></tr>
<tr><td></td><td align="right" id="added">+17</td><td align="right" id="removed">-3</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
- Fixed ant task.
- Run the ant task as part of smoketest target.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins/ant<br /></span>
<div class="fileheader"><big><b>JoodiTask.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- JoodiTask.java 17 Dec 2004 00:54:01 -0000 1.3
+++ JoodiTask.java 4 Jan 2005 02:12:26 -0000 1.4
@@ -25,8 +25,8 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.plugins.ant;
import net.sf.joodi.plugins.Joodi;
</pre><pre class="diff" id="removed">-import net.sf.joodi.reporting.FileReportWriter;
</pre><pre class="diff" id="context"> import net.sf.joodi.reporting.FileReportDestination;
</pre><pre class="diff" id="added">+import net.sf.joodi.reporting.FileReportWriter;
</pre><pre class="diff" id="context"> import net.sf.joodi.util.ClassLoaderResourceProvider;
import net.sf.joodi.util.PreloadingResourceProvider;
import org.apache.commons.logging.Log;
</pre><pre class="diff"><small id="info">@@ -40,7 +40,7 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: JoodiTask.java,v 1.<span id="removedchars">3 2004/12/17 00:54:01</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: JoodiTask.java,v 1.<span id="addedchars">4 2005/01/04 02:12:26</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class JoodiTask extends Task {
private static final Log LOG = LogFactory.getLog(JoodiTask.class);
</pre><pre class="diff"><small id="info">@@ -66,10 +66,14 @@
</small></pre><pre class="diff" id="context"> throw new BuildException("No report file specified.");
}
</pre><pre class="diff" id="added">+ ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
</pre><pre class="diff" id="context"> try {
doExecute();
} catch (IOException e) {
throw new BuildException(e);
</pre><pre class="diff" id="added">+ } finally {
+ Thread.currentThread().setContextClassLoader(oldContextClassLoader);
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src<br /></span>
<div class="fileheader"><big><b>build.xml</b></big> <small id="info">1.14 -> 1.15</small></div>
<pre class="diff"><small id="info">diff -u -r1.14 -r1.15
--- build.xml 13 Dec 2004 06:31:13 -0000 1.14
+++ build.xml 4 Jan 2005 02:12:27 -0000 1.15
@@ -1,5 +1,5 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: build.xml,v 1.1<span id="removedchars">4 2004/12/13 06:31:13</span> adammurdoch Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: build.xml,v 1.1<span id="addedchars">5 2005/01/04 02:12:27</span> adammurdoch Exp $ -->
</pre><pre class="diff" id="context">
<project default="all" name="joodi" basedir=".">
<tstamp/>
</pre><pre class="diff"><small id="info">@@ -211,6 +211,16 @@
</small></pre><pre class="diff" id="context"> </target>
<target name="smoketest" depends="dist">
</pre><pre class="diff" id="added">+ <taskdef name="joodi" classname="net.sf.joodi.plugins.ant.JoodiTask">
+ <classpath>
+ <fileset dir="${build.dist.dir}" includes="**/*.jar"/>
+ </classpath>
+ </taskdef>
+ <joodi report="${build.dir}/report.html">
+ <path location="${build.dist.dir}/${jar.file}"/>
+ <path location="${build.classes.test.dir}"/>
+ </joodi>
+
</pre><pre class="diff" id="context"> <java fork="yes" jar="${build.dist.dir}/${jar.file}" failonerror="yes">
<arg value="--out"/>
<arg file="${build.dir}/report.html"/>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1"><span id="removed">ArrayType.java</span></a></tt></td><td></td><td align="right" id="removed">-61</td><td nowrap="nowrap">1.8 removed</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file2">Fixtures.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr><td><tt> /<a href="#file3"><span id="removed">ArrayTypeTest.java</span></a></tt></td><td></td><td align="right" id="removed">-60</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr><td></td><td align="right" id="added">+1</td><td align="right" id="removed">-125</td><td></td></tr>
</table>
<small id="info">2 removed + 1 modified, total 3 files</small><br />
<pre class="comment">
Removed ArrayType. The model is currently not capable of evaluating (for example) method overrides, as it cannot distinguish between a return type of String and String[][]. This capability will be reintroduced soon and wasn't being used yet anyway.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>ArrayType.java</b></big> <small id="info">removed after 1.8</small></div>
<pre class="diff"><small id="info">diff -N ArrayType.java
--- ArrayType.java 17 Dec 2004 01:55:53 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,61 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import java.util.Set;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:si...@re...">Simon Harris</a>
- * @version $Id: ArrayType.java,v 1.8 2004/12/17 01:55:53 adammurdoch Exp $
- */
-public class ArrayType extends AbstractType implements Type, TypeUse {
- private final Type _elementType;
-
- public ArrayType(String name, Namespace namespace, Type elementType) {
- super(name, namespace);
- _elementType = elementType;
- }
-
- public Type getElementType() {
- return _elementType;
- }
-
- public Type getUsingType() {
- return this;
- }
-
- public Type getUsedType() {
- return _elementType;
- }
-
- public Set getDirectSuperTypes() {
- return Collections.EMPTY_SET;
- }
-
- public Set getTypeUses() {
- return Collections.singleton(this);
- }
-}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Fixtures.java</b></big> <small id="info">1.9 -> 1.10</small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- Fixtures.java 17 Dec 2004 01:55:55 -0000 1.9
+++ Fixtures.java 31 Dec 2004 23:47:49 -0000 1.10
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: Fixtures.java,v 1.9 2004/12/17 01:55:55 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Fixtures.java,v 1.10 2004/12/31 23:47:49 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public final class Fixtures {
public static final DefaultNamespace NAMESPACE_P = new DefaultNamespace("namespaceP");
</pre><pre class="diff"><small id="info">@@ -86,7 +86,4 @@
</small></pre><pre class="diff" id="context"> return new SimpleType(name, new DefaultNamespace(namespace));
}
</pre><pre class="diff" id="removed">- public static ArrayType createArrayType(Type elementType) {
- return new ArrayType(elementType.getName() + "[]", elementType.getNamespace(), elementType);
- }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="removed">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>ArrayTypeTest.java</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N ArrayTypeTest.java
--- ArrayTypeTest.java 16 Dec 2004 05:43:45 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * The RedHill Consulting, Pty. Ltd. Software License, Version 1.0
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistribution and use in source or binary forms IS NOT PERMITTED
- * without prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import junit.framework.TestCase;
-
-/**
- * @author <a href="mailto:si...@re...">Simon Harris</a>
- * @version $Id: ArrayTypeTest.java,v 1.6 2004/12/16 05:43:45 adammurdoch Exp $
- */
-public class ArrayTypeTest extends TestCase {
- public void testIsAType() {
- assertTrue(Type.class.isAssignableFrom(ArrayType.class));
- }
-
- public void testIsATypeUse() {
- assertTrue(TypeUse.class.isAssignableFrom(ArrayType.class));
- }
-
- public void testConstruction() {
- ArrayType type = Fixtures.createArrayType(Fixtures.TYPE_A);
-
- assertEquals(Fixtures.TYPE_A.getName() + "[]", type.getName());
- assertSame(Fixtures.TYPE_A.getNamespace(), type.getNamespace());
- assertSame(type, type.getUsingType());
- assertSame(Fixtures.TYPE_A, type.getUsedType());
- }
-
- public void testUsesElementTypeOnly() {
- ArrayType type = Fixtures.createArrayType(Fixtures.TYPE_A);
-
- assertEquals(1, type.getTypeUses().size());
- assertTrue(type.getTypeUses().contains(type));
- }
-
- // TODO - this isn't true, an array type does have supertypes, but we don't really care yet
- public void testHasNoSuperTypes() {
- ArrayType type = Fixtures.createArrayType(Fixtures.TYPE_A);
- assertTrue(type.getDirectSuperTypes().isEmpty());
- }
-}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2004-12-31 23:03:36
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file1">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">ModelBuildingTypeVisitor.java</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td><tt> /<a href="#file3">TypeLibrary.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.10 -> 1.11</td></tr>
<tr class="alt"><td><tt>main/net/sf/joodi/rules/drools/<a href="#file4">joodi.drl</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center">1.10 -> 1.11</td></tr>
<tr><td><tt>test/net/sf/joodi/parser/<a href="#file5">DefaultTypeLibraryTest.java</a></tt></td><td align="right" id="added">+34</td><td align="right" id="removed">-34</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file6">ModelBuildingTypeVisitorTest.java</a></tt></td><td align="right" id="added">+19</td><td align="right" id="removed">-19</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td></td><td align="right" id="added">+79</td><td align="right" id="removed">-79</td><td></td></tr>
</table>
<small id="info">6 modified files</small><br />
<pre class="comment">
renamed TypeLibrary.getObjectType to getType. TypeLibrary interface is now nice and simple.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- DefaultTypeLibrary.java 31 Dec 2004 22:50:23 -0000 1.4
+++ DefaultTypeLibrary.java 31 Dec 2004 23:03:27 -0000 1.5
@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.<span id="removedchars">4 2004/12/31 22:50:23</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.<span id="addedchars">5 2004/12/31 23:03:27</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff"><small id="info">@@ -73,7 +73,7 @@
</small></pre><pre class="diff" id="context"> /**
* Returns an object type.
*/
</pre><pre class="diff" id="removed">- public Type get<span id="removedchars">Object</span>Type(String typeName) {
</pre><pre class="diff" id="added">+ public Type getType(String typeName) {
</pre><pre class="diff" id="context"> Assert.isTrue(typeName != null, "typeName can't be null");
// TODO get rid of this and reject arrayed type names
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitor.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- ModelBuildingTypeVisitor.java 31 Dec 2004 22:50:23 -0000 1.4
+++ ModelBuildingTypeVisitor.java 31 Dec 2004 23:03:27 -0000 1.5
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitor.java,v 1.<span id="removedchars">4 2004/12/31 22:50:23</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitor.java,v 1.<span id="addedchars">5 2004/12/31 23:03:27</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitor implements TypeVisitor {
private final TypeLibrary _typeLibrary;
</pre><pre class="diff"><small id="info">@@ -44,50 +44,50 @@
</small></pre><pre class="diff" id="context">
public void visitType(String name) {
Assert.isTrue(name != null, "name can't be null");
</pre><pre class="diff" id="removed">- _type = (SimpleType) _typeLibrary.get<span id="removedchars">Object</span>Type(name);
</pre><pre class="diff" id="added">+ _type = (SimpleType) _typeLibrary.getType(name);
</pre><pre class="diff" id="context"> }
public void visitSuperType(String name) {
Assert.isTrue(name != null, "name can't be null");
if (!name.equals(Object.class.getName())) {
</pre><pre class="diff" id="removed">- _type.addSuperType(_typeLibrary.get<span id="removedchars">Object</span>Type(name));
</pre><pre class="diff" id="added">+ _type.addSuperType(_typeLibrary.getType(name));
</pre><pre class="diff" id="context"> }
}
public void visitOperation(String name, String signature, String returnTypeName) {
Assert.isTrue(_type != null, "_type can't be null");
</pre><pre class="diff" id="removed">- _operation = new Operation(_type, name, signature, _typeLibrary.get<span id="removedchars">Object</span>Type(returnTypeName));
</pre><pre class="diff" id="added">+ _operation = new Operation(_type, name, signature, _typeLibrary.getType(returnTypeName));
</pre><pre class="diff" id="context">
_type.addTypeUse(new ReturnTypeUse(_operation));
}
public void visitParameter(String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new ParameterTypeUse(_operation, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new ParameterTypeUse(_operation, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="context"> }
public void visitThrowable(String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new ThrowableTypeUse(_operation, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new ThrowableTypeUse(_operation, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="context"> }
public void visitField(String fieldName, String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new Field(_type, fieldName, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new Field(_type, fieldName, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="context"> }
public void visitLocalVariable(String localVariableName, String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new LocalVariable(_operation, localVariableName, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new LocalVariable(_operation, localVariableName, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="context"> }
public void visitStaticOperationUse(String typeName, String operationName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new StaticOperationTypeUse(_operation, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName), operationName));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new StaticOperationTypeUse(_operation, _typeLibrary.getType(typeName), operationName));
</pre><pre class="diff" id="context"> }
public void visitStaticFieldUse(String typeName, String fieldName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new StaticFieldTypeUse(_operation, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName), fieldName));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new StaticFieldTypeUse(_operation, _typeLibrary.getType(typeName), fieldName));
</pre><pre class="diff" id="context"> }
public void visitObjectInstantiation(String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new InstantiationTypeUse(_operation, _typeLibrary.get<span id="removedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new InstantiationTypeUse(_operation, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>TypeLibrary.java</b></big> <small id="info">1.10 -> 1.11</small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- TypeLibrary.java 31 Dec 2004 22:50:23 -0000 1.10
+++ TypeLibrary.java 31 Dec 2004 23:03:27 -0000 1.11
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Set;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TypeLibrary.java,v 1.1<span id="removedchars">0 2004/12/31 22:50:23</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeLibrary.java,v 1.1<span id="addedchars">1 2004/12/31 23:03:27</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public interface TypeLibrary {
/**
</pre><pre class="diff"><small id="info">@@ -45,5 +45,5 @@
</small></pre><pre class="diff" id="context"> /**
* Returns an object type.
*/
</pre><pre class="diff" id="removed">- Type get<span id="removedchars">Object</span>Type(String typeName);
</pre><pre class="diff" id="added">+ Type getType(String typeName);
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>joodi.drl</b></big> <small id="info">1.10 -> 1.11</small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- joodi.drl 31 Dec 2004 22:50:24 -0000 1.10
+++ joodi.drl 31 Dec 2004 23:03:27 -0000 1.11
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context">
<!--
@author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- @version $Id: joodi.drl,v 1.1<span id="removedchars">0 2004/12/31 22:50:24</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ @version $Id: joodi.drl,v 1.1<span id="addedchars">1 2004/12/31 23:03:27</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> -->
<rule-set name="JOODI Rules"
</pre><pre class="diff"><small id="info">@@ -32,20 +32,20 @@
</small></pre><pre class="diff" id="context"> <java:class>TypeLibrary</java:class>
</parameter>
<java:consequence>
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Short.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Integer.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Long.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Float.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Double.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getType(Short.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getType(Integer.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getType(Long.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getType(Float.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getType(Double.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.get<span id="removedchars">Object</span>Type(Byte.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getType(Byte.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Character.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getObjectType(String.class.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getType(Character.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getType(String.class.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.get<span id="removedchars">Object</span>Type(Void.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getType(Void.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.get<span id="removedchars">Object</span>Type(Boolean.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getType(Boolean.TYPE.getName())));
</pre><pre class="diff" id="context"> </java:consequence>
</rule>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibraryTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- DefaultTypeLibraryTest.java 31 Dec 2004 22:50:24 -0000 1.3
+++ DefaultTypeLibraryTest.java 31 Dec 2004 23:03:28 -0000 1.4
@@ -32,32 +32,32 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibraryTest.java,v 1.<span id="removedchars">3 2004/12/31 22:50:24</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibraryTest.java,v 1.<span id="addedchars">4 2004/12/31 23:03:28</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibraryTest extends TestCase {
public void testCanGetPrimitiveTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- assertTrue(library.getObjectType("boolean") instanceof PrimitiveType);
- PrimitiveType type = (PrimitiveType) library.getObjectType("boolean");
</pre><pre class="diff" id="added">+ assertTrue(library.getType("boolean") instanceof PrimitiveType);
+ PrimitiveType type = (PrimitiveType) library.getType("boolean");
</pre><pre class="diff" id="context"> assertEquals("boolean", type.getName());
assertEquals("", type.getNamespace().getName());
</pre><pre class="diff" id="removed">- assertTrue(library.getObjectType("void") instanceof PrimitiveType);
- assertTrue(library.getObjectType("short") instanceof PrimitiveType);
- assertTrue(library.getObjectType("int") instanceof PrimitiveType);
- assertTrue(library.getObjectType("long") instanceof PrimitiveType);
- assertTrue(library.getObjectType("float") instanceof PrimitiveType);
- assertTrue(library.getObjectType("double") instanceof PrimitiveType);
- assertTrue(library.getObjectType("char") instanceof PrimitiveType);
- assertTrue(library.getObjectType("byte") instanceof PrimitiveType);
</pre><pre class="diff" id="added">+ assertTrue(library.getType("void") instanceof PrimitiveType);
+ assertTrue(library.getType("short") instanceof PrimitiveType);
+ assertTrue(library.getType("int") instanceof PrimitiveType);
+ assertTrue(library.getType("long") instanceof PrimitiveType);
+ assertTrue(library.getType("float") instanceof PrimitiveType);
+ assertTrue(library.getType("double") instanceof PrimitiveType);
+ assertTrue(library.getType("char") instanceof PrimitiveType);
+ assertTrue(library.getType("byte") instanceof PrimitiveType);
</pre><pre class="diff" id="context"> }
public void testCanGetObjectTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("a.A");
</pre><pre class="diff" id="added">+ Type type = library.getType("a.A");
</pre><pre class="diff" id="context">
assertTrue(type instanceof SimpleType);
assertEquals("a", type.getNamespace().getName());
</pre><pre class="diff"><small id="info">@@ -75,57 +75,57 @@
</small></pre><pre class="diff" id="context"> public void testCanGetObjectArrayTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("a.A[]");
</pre><pre class="diff" id="added">+ Type type = library.getType("a.A[]");
</pre><pre class="diff" id="context"> assertEquals("a.A", type.getName());
</pre><pre class="diff" id="removed">- assertSame(library.getObjectType("a.A"), type);
- assertSame(library.getObjectType("a.A[][]"), type);
- assertSame(library.getObjectType("a.A[][][][][]"), type);
</pre><pre class="diff" id="added">+ assertSame(library.getType("a.A"), type);
+ assertSame(library.getType("a.A[][]"), type);
+ assertSame(library.getType("a.A[][][][][]"), type);
</pre><pre class="diff" id="context"> }
public void testCanGetPrimitiveArrayTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("boolean[]");
</pre><pre class="diff" id="added">+ Type type = library.getType("boolean[]");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- assertSame(library.get<span id="removedchars">Object</span>Type("boolean"), type);
</pre><pre class="diff" id="added">+ assertSame(library.getType("boolean"), type);
</pre><pre class="diff" id="context"> }
public void testSameTypeNameReturnsSameTypeInstance() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("typeName");
</pre><pre class="diff" id="added">+ Type type = library.getType("typeName");
</pre><pre class="diff" id="context">
assertNotNull(type);
</pre><pre class="diff" id="removed">- assertSame(type, library.get<span id="removedchars">Object</span>Type("typeName"));
</pre><pre class="diff" id="added">+ assertSame(type, library.getType("typeName"));
</pre><pre class="diff" id="context"> }
public void testSameNamespaceNameReturnsSameNamespaceInstance() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Namespace namespace = library.get<span id="removedchars">Object</span>Type("p.a").getNamespace();
</pre><pre class="diff" id="added">+ Namespace namespace = library.getType("p.a").getNamespace();
</pre><pre class="diff" id="context">
assertNotNull(namespace);
</pre><pre class="diff" id="removed">- assertSame(namespace, library.get<span id="removedchars">Object</span>Type("p.b").getNamespace());
</pre><pre class="diff" id="added">+ assertSame(namespace, library.getType("p.b").getNamespace());
</pre><pre class="diff" id="context"> assertEquals("p", namespace.getName());
}
public void testNamespaceNameIsExtractedCorrectlyFromFullyQualifiedTypeName() {
TypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- assertEquals("", typeLibrary.getObjectType("A").getNamespace().getName());
- assertEquals("p", typeLibrary.getObjectType("p.A").getNamespace().getName());
- assertEquals("p.q", typeLibrary.getObjectType("p.q.A").getNamespace().getName());
- assertEquals("p.q.r", typeLibrary.getObjectType("p.q.r.A").getNamespace().getName());
- assertEquals("crazy/crap-name.A.A", typeLibrary.getObjectType("crazy/crap-name.A.A.A").getNamespace().getName());
</pre><pre class="diff" id="added">+ assertEquals("", typeLibrary.getType("A").getNamespace().getName());
+ assertEquals("p", typeLibrary.getType("p.A").getNamespace().getName());
+ assertEquals("p.q", typeLibrary.getType("p.q.A").getNamespace().getName());
+ assertEquals("p.q.r", typeLibrary.getType("p.q.r.A").getNamespace().getName());
+ assertEquals("crazy/crap-name.A.A", typeLibrary.getType("crazy/crap-name.A.A.A").getNamespace().getName());
</pre><pre class="diff" id="context"> }
public void testTypesWithTheSameNameInDifferentNameSpacesAreDistinct() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type t1 = library.getObjectType("p1.A");
- Type t2 = library.getObjectType("p2.A");
</pre><pre class="diff" id="added">+ Type t1 = library.getType("p1.A");
+ Type t2 = library.getType("p2.A");
</pre><pre class="diff" id="context">
assertNotNull(t1);
assertNotNull(t2);
</pre><pre class="diff"><small id="info">@@ -136,21 +136,21 @@
</small></pre><pre class="diff" id="context"> public void testSamePrimitiveTypeReturnsSameInstance() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("int");
</pre><pre class="diff" id="added">+ Type type = library.getType("int");
</pre><pre class="diff" id="context">
assertNotNull(type);
</pre><pre class="diff" id="removed">- assertSame(type, library.get<span id="removedchars">Object</span>Type("int"));
</pre><pre class="diff" id="added">+ assertSame(type, library.getType("int"));
</pre><pre class="diff" id="context"> }
public void testCanGetAllReferencedNamespaces() {
TypeLibrary library = new DefaultTypeLibrary();
Set expectedNamespaces = new HashSet();
</pre><pre class="diff" id="removed">- expectedNamespaces.add(library.get<span id="removedchars">Object</span>Type("int").getNamespace());
</pre><pre class="diff" id="added">+ expectedNamespaces.add(library.getType("int").getNamespace());
</pre><pre class="diff" id="context"> assertEquals(expectedNamespaces, library.getNamespaces());
</pre><pre class="diff" id="removed">- expectedNamespaces.add(library.get<span id="removedchars">Object</span>Type("a.b.C").getNamespace());
</pre><pre class="diff" id="added">+ expectedNamespaces.add(library.getType("a.b.C").getNamespace());
</pre><pre class="diff" id="context"> assertEquals(expectedNamespaces, library.getNamespaces());
}
</pre><pre class="diff"><small id="info">@@ -158,7 +158,7 @@
</small></pre><pre class="diff" id="context"> TypeLibrary library = new DefaultTypeLibrary();
assertEquals(9, library.getTypes().size());
</pre><pre class="diff" id="removed">- Type type = library.get<span id="removedchars">Object</span>Type("a.b.A");
</pre><pre class="diff" id="added">+ Type type = library.getType("a.b.A");
</pre><pre class="diff" id="context"> assertTrue(library.getTypes().contains(type));
}
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitorTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- ModelBuildingTypeVisitorTest.java 16 Dec 2004 01:33:57 -0000 1.4
+++ ModelBuildingTypeVisitorTest.java 31 Dec 2004 23:03:28 -0000 1.5
@@ -30,14 +30,14 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.4 2004/12/16 01:33:57 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitorTest.java,v 1.5 2004/12/31 23:03:28 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitorTest extends AbstractRuleTestCase {
public void testAddsTypeUseOnSuperType() {
DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = typeLibrary.getObjectType("A");
- Type superType = typeLibrary.getObjectType("B");
</pre><pre class="diff" id="added">+ Type type = typeLibrary.getType("A");
+ Type superType = typeLibrary.getType("B");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff"><small id="info">@@ -50,8 +50,8 @@
</small></pre><pre class="diff" id="context">
public void testAddsTypeUseOnReturnTypeOfOperation() {
DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = typeLibrary.getObjectType("A");
- Type other = typeLibrary.getObjectType("B");
</pre><pre class="diff" id="added">+ Type type = typeLibrary.getType("A");
+ Type other = typeLibrary.getType("B");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff"><small id="info">@@ -63,8 +63,8 @@
</small></pre><pre class="diff" id="context">
public void testAddsTypeUseOnParameterOfOperation() {
DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = typeLibrary.getObjectType("A");
- Type other = typeLibrary.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = typeLibrary.getType("A");
+ Type other = typeLibrary.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff"><small id="info">@@ -77,8 +77,8 @@
</small></pre><pre class="diff" id="context">
public void testAddsTypeUseOnOperationThrowable() {
DefaultTypeLibrary typeLibrary = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = typeLibrary.getObjectType("A");
- Type other = typeLibrary.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = typeLibrary.getType("A");
+ Type other = typeLibrary.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(typeLibrary);
</pre><pre class="diff"><small id="info">@@ -103,8 +103,8 @@
</small></pre><pre class="diff" id="context"> public void testAddsTypeUseForField() {
DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getObjectType("A");
- Type fieldType = library.getObjectType("B");
</pre><pre class="diff" id="added">+ Type type = library.getType("A");
+ Type fieldType = library.getType("B");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff"><small id="info">@@ -117,8 +117,8 @@
</small></pre><pre class="diff" id="context"> public void testAddsTypeUseForLocalVariable() {
DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getObjectType("A");
- Type varType = library.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = library.getType("A");
+ Type varType = library.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff"><small id="info">@@ -132,8 +132,8 @@
</small></pre><pre class="diff" id="context"> public void testAddsTypeUseForStaticOperationUse() {
DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getObjectType("A");
- Type other = library.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = library.getType("A");
+ Type other = library.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff"><small id="info">@@ -147,8 +147,8 @@
</small></pre><pre class="diff" id="context"> public void testAddsTypeUseForStaticFieldUse() {
DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getObjectType("A");
- Type other = library.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = library.getType("A");
+ Type other = library.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre><pre class="diff"><small id="info">@@ -162,8 +162,8 @@
</small></pre><pre class="diff" id="context"> public void testAddsTypeUseForObjectInstantiation() {
DefaultTypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getObjectType("A");
- Type other = library.getObjectType("C");
</pre><pre class="diff" id="added">+ Type type = library.getType("A");
+ Type other = library.getType("C");
</pre><pre class="diff" id="context">
ModelBuildingTypeVisitor visitor = new ModelBuildingTypeVisitor(library);
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file1">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-32</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">ModelBuildingTypeVisitor.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-7</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt> /<a href="#file3">TypeLibrary.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-8</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr class="alt"><td><tt>main/net/sf/joodi/rules/drools/<a href="#file4">joodi.drl</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr><td><tt>test/net/sf/joodi/parser/<a href="#file5">DefaultTypeLibraryTest.java</a></tt></td><td align="right" id="added">+35</td><td align="right" id="removed">-39</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt><a href="#file6">.cvsignore</a></tt></td><td align="right" id="added">+1</td><td></td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td></td><td align="right" id="added">+67</td><td align="right" id="removed">-97</td><td></td></tr>
</table>
<small id="info">6 modified files</small><br />
<div class="tasklist"><ul>
<li><a href="#task1">TODO get rid of this and reject arrayed type names</a></li>
</ul></div>
<pre class="comment">
First round of refactoring towards removing array concepts from TypeLibrary. TypeLibrary will only represent the immutable contents of a set of Types, with new classes handling issues related to referencing Types in array and scalar contexts.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- DefaultTypeLibrary.java 17 Dec 2004 01:55:54 -0000 1.3
+++ DefaultTypeLibrary.java 31 Dec 2004 22:50:23 -0000 1.4
@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.3 2004/12/17 01:55:54 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.4 2004/12/31 22:50:23 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff"><small id="info">@@ -70,45 +70,24 @@
</small></pre><pre class="diff" id="context"> return new HashSet(_typesByName.values());
}
</pre><pre class="diff" id="removed">- private ArrayType getArrayType(Type elementType) {
- Assert.isTrue(elementType != null, "elementType can't be null");
-
- String typeName = elementType.getName() + "[]";
- return new ArrayType(typeName, elementType.getNamespace(), elementType);
- }
-
</pre><pre class="diff" id="context"> /**
* Returns an object type.
*/
</pre><pre class="diff" id="removed">- public SimpleType getObjectType(String typeName) {
- SimpleType type = (SimpleType) _typesByName.get(typeName);
- if (type == null) {
- type = new SimpleType(typeName, getNamespace(typeName));
- _typesByName.put(typeName, type);
- }
-
- return type;
- }
-
- /**
- * Returns a type.
- */
- public Type getType(String typeName) {
</pre><pre class="diff" id="added">+ public Type getObjectType(String typeName) {
</pre><pre class="diff" id="context"> Assert.isTrue(typeName != null, "typeName can't be null");
</pre><pre class="diff" id="removed">- Type type = (Type) _typesByName.get(typeName);
- if (type != null) {
- return type;
</pre><pre class="diff" id="added"><a name="task1" />+ // <span class="task">TODO</span> get rid of this and reject arrayed type names
+ String baseTypeName = typeName;
+ while (baseTypeName.endsWith("[]")) {
+ baseTypeName = baseTypeName.substring(0, baseTypeName.length() - 2);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- if (typeName.endsWith("[]")) {
- String elementTypeName = typeName.substring(0, typeName.length() - 2);
- Type elementType = getType(elementTypeName);
- type = new ArrayType(typeName, elementType.getNamespace(), elementType);
- } else {
- type = new SimpleType(typeName, getNamespace(typeName));
</pre><pre class="diff" id="added">+ Type type = (Type) _typesByName.get(baseTypeName);
+ if (type == null) {
+ type = new SimpleType(baseTypeName, getNamespace(baseTypeName));
+ _typesByName.put(baseTypeName, type);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- _typesByName.put(typeName, type);
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return type;
}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>ModelBuildingTypeVisitor.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- ModelBuildingTypeVisitor.java 15 Dec 2004 23:34:34 -0000 1.3
+++ ModelBuildingTypeVisitor.java 31 Dec 2004 22:50:23 -0000 1.4
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ModelBuildingTypeVisitor.java,v 1.3 2004/12/15 23:34:34 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ModelBuildingTypeVisitor.java,v 1.4 2004/12/31 22:50:23 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class ModelBuildingTypeVisitor implements TypeVisitor {
private final TypeLibrary _typeLibrary;
</pre><pre class="diff"><small id="info">@@ -44,7 +44,7 @@
</small></pre><pre class="diff" id="context">
public void visitType(String name) {
Assert.isTrue(name != null, "name can't be null");
</pre><pre class="diff" id="removed">- _type = _typeLibrary.getObjectType(name);
</pre><pre class="diff" id="added">+ _type = <span id="addedchars">(SimpleType) </span>_typeLibrary.getObjectType(name);
</pre><pre class="diff" id="context"> }
public void visitSuperType(String name) {
</pre><pre class="diff"><small id="info">@@ -58,13 +58,13 @@
</small></pre><pre class="diff" id="context"> public void visitOperation(String name, String signature, String returnTypeName) {
Assert.isTrue(_type != null, "_type can't be null");
</pre><pre class="diff" id="removed">- _operation = new Operation(_type, name, signature, _typeLibrary.getType(returnTypeName));
</pre><pre class="diff" id="added">+ _operation = new Operation(_type, name, signature, _typeLibrary.get<span id="addedchars">Object</span>Type(returnTypeName));
</pre><pre class="diff" id="context">
_type.addTypeUse(new ReturnTypeUse(_operation));
}
public void visitParameter(String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new ParameterTypeUse(_operation, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new ParameterTypeUse(_operation, _typeLibrary.get<span id="addedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="context"> }
public void visitThrowable(String typeName) {
</pre><pre class="diff"><small id="info">@@ -72,11 +72,11 @@
</small></pre><pre class="diff" id="context"> }
public void visitField(String fieldName, String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new Field(_type, fieldName, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new Field(_type, fieldName, _typeLibrary.get<span id="addedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="context"> }
public void visitLocalVariable(String localVariableName, String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new LocalVariable(_operation, localVariableName, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new LocalVariable(_operation, localVariableName, _typeLibrary.get<span id="addedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="context"> }
public void visitStaticOperationUse(String typeName, String operationName) {
</pre><pre class="diff"><small id="info">@@ -88,6 +88,6 @@
</small></pre><pre class="diff" id="context"> }
public void visitObjectInstantiation(String typeName) {
</pre><pre class="diff" id="removed">- _type.addTypeUse(new InstantiationTypeUse(_operation, _typeLibrary.getType(typeName)));
</pre><pre class="diff" id="added">+ _type.addTypeUse(new InstantiationTypeUse(_operation, _typeLibrary.get<span id="addedchars">Object</span>Type(typeName)));
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>TypeLibrary.java</b></big> <small id="info">1.9 -> 1.10</small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- TypeLibrary.java 15 Dec 2004 23:34:34 -0000 1.9
+++ TypeLibrary.java 31 Dec 2004 22:50:23 -0000 1.10
@@ -24,13 +24,12 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.parser;
</pre><pre class="diff" id="removed">-import net.sf.joodi.facts.SimpleType;
</pre><pre class="diff" id="context"> import net.sf.joodi.facts.Type;
import java.util.Set;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TypeLibrary.java,v 1.9 2004/12/15 23:34:34 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TypeLibrary.java,v 1.10 2004/12/31 22:50:23 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public interface TypeLibrary {
/**
</pre><pre class="diff"><small id="info">@@ -46,10 +45,5 @@
</small></pre><pre class="diff" id="context"> /**
* Returns an object type.
*/
</pre><pre class="diff" id="removed">- SimpleType getObjectType(String typeName);
-
- /**
- * Returns a type.
- */
- Type getType(String typeName);
</pre><pre class="diff" id="added">+ Type getObjectType(String typeName);
</pre><pre class="diff" id="context"> }
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>joodi.drl</b></big> <small id="info">1.9 -> 1.10</small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- joodi.drl 23 Dec 2004 12:26:26 -0000 1.9
+++ joodi.drl 31 Dec 2004 22:50:24 -0000 1.10
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context">
<!--
@author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- @version $Id: joodi.drl,v 1.<span id="removedchars">9 2004/12/23 12:26:26</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ @version $Id: joodi.drl,v 1.<span id="addedchars">10 2004/12/31 22:50:24</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> -->
<rule-set name="JOODI Rules"
</pre><pre class="diff"><small id="info">@@ -32,20 +32,20 @@
</small></pre><pre class="diff" id="context"> <java:class>TypeLibrary</java:class>
</parameter>
<java:consequence>
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getType(Short.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getType(Integer.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getType(Long.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getType(Float.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getType(Double.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Short.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Integer.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Long.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Float.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Double.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getType(Byte.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.get<span id="addedchars">Object</span>Type(Byte.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getType(Character.TYPE.getName())));
- drools.assertObject(new IsSerializable(typeLibrary.getType(String.class.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(Character.TYPE.getName())));
+ drools.assertObject(new IsSerializable(typeLibrary.getObjectType(String.class.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getType(Void.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.get<span id="addedchars">Object</span>Type(Void.TYPE.getName())));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- drools.assertObject(new IsSerializable(typeLibrary.getType(Boolean.TYPE.getName())));
</pre><pre class="diff" id="added">+ drools.assertObject(new IsSerializable(typeLibrary.get<span id="addedchars">Object</span>Type(Boolean.TYPE.getName())));
</pre><pre class="diff" id="context"> </java:consequence>
</rule>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibraryTest.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- DefaultTypeLibraryTest.java 15 Dec 2004 23:34:35 -0000 1.2
+++ DefaultTypeLibraryTest.java 31 Dec 2004 22:50:24 -0000 1.3
@@ -32,62 +32,68 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibraryTest.java,v 1.2 2004/12/15 23:34:35 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibraryTest.java,v 1.3 2004/12/31 22:50:24 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibraryTest extends TestCase {
public void testCanGetPrimitiveTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- assertTrue(library.getType("boolean") instanceof PrimitiveType);
- PrimitiveType type = (PrimitiveType) library.getType("boolean");
</pre><pre class="diff" id="added">+ assertTrue(library.getObjectType("boolean") instanceof PrimitiveType);
+ PrimitiveType type = (PrimitiveType) library.getObjectType("boolean");
</pre><pre class="diff" id="context"> assertEquals("boolean", type.getName());
assertEquals("", type.getNamespace().getName());
</pre><pre class="diff" id="removed">- assertTrue(library.getType("void") instanceof PrimitiveType);
- assertTrue(library.getType("short") instanceof PrimitiveType);
- assertTrue(library.getType("int") instanceof PrimitiveType);
- assertTrue(library.getType("long") instanceof PrimitiveType);
- assertTrue(library.getType("float") instanceof PrimitiveType);
- assertTrue(library.getType("double") instanceof PrimitiveType);
- assertTrue(library.getType("char") instanceof PrimitiveType);
- assertTrue(library.getType("byte") instanceof PrimitiveType);
</pre><pre class="diff" id="added">+ assertTrue(library.getObjectType("void") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("short") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("int") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("long") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("float") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("double") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("char") instanceof PrimitiveType);
+ assertTrue(library.getObjectType("byte") instanceof PrimitiveType);
</pre><pre class="diff" id="context"> }
public void testCanGetObjectTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getType("a.A");
</pre><pre class="diff" id="added">+ Type type = library.get<span id="addedchars">Object</span>Type("a.A");
</pre><pre class="diff" id="context">
assertTrue(type instanceof SimpleType);
assertEquals("a", type.getNamespace().getName());
assertEquals("a.A", type.getName());
}
</pre><pre class="diff" id="added">+ /**
+ * Requests to a type library to retrieve an arrayed type
+ * formerly returned ArrayType objects. It now just returns the type itself.
+ * We want to move to a design
+ * where the type library is an immutable representation of the types
+ * stored in it, and the old array handling made the usage of those types
+ * impact the library itself, by creating new ArrayTypes inside it.
+ */
</pre><pre class="diff" id="context"> public void testCanGetObjectArrayTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getType("a.A[]");
-
- assertTrue(type instanceof ArrayType);
- ArrayType arrayType = (ArrayType) type;
- assertSame(library.getType("a.A"), arrayType.getElementType());
</pre><pre class="diff" id="added">+ Type type = library.getObjectType("a.A[]");
+ assertEquals("a.A", type.getName());
+ assertSame(library.getObjectType("a.A"), type);
+ assertSame(library.getObjectType("a.A[][]"), type);
+ assertSame(library.getObjectType("a.A[][][][][]"), type);
</pre><pre class="diff" id="context"> }
public void testCanGetPrimitiveArrayTypesByName() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getType("boolean[]");
</pre><pre class="diff" id="added">+ Type type = library.get<span id="addedchars">Object</span>Type("boolean[]");
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- assertTrue(type instanceof ArrayType);
- ArrayType arrayType = (ArrayType) type;
- assertSame(library.getType("boolean"), arrayType.getElementType());
</pre><pre class="diff" id="added">+ assertSame(library.getObjectType("boolean"), type);
</pre><pre class="diff" id="context"> }
public void testSameTypeNameReturnsSameTypeInstance() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- <span id="removedchars">Simple</span>Type type = library.getObjectType("typeName");
</pre><pre class="diff" id="added">+ Type type = library.getObjectType("typeName");
</pre><pre class="diff" id="context">
assertNotNull(type);
</pre><pre class="diff"><small id="info">@@ -118,8 +124,8 @@
</small></pre><pre class="diff" id="context"> public void testTypesWithTheSameNameInDifferentNameSpacesAreDistinct() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- SimpleType t1 = library.getObjectType("p1.A");
- SimpleType t2 = library.getObjectType("p2.A");
</pre><pre class="diff" id="added">+ Type t1 = library.getObjectType("p1.A");
+ Type t2 = library.getObjectType("p2.A");
</pre><pre class="diff" id="context">
assertNotNull(t1);
assertNotNull(t2);
</pre><pre class="diff"><small id="info">@@ -127,34 +133,24 @@
</small></pre><pre class="diff" id="context"> assertNotSame(t1, t2);
}
</pre><pre class="diff" id="removed">- public void testSameArrayTypeReturnsSameInstance() {
- TypeLibrary library = new DefaultTypeLibrary();
-
- Type type = library.getType("A[]");
-
- assertNotNull(type);
-
- assertSame(type, library.getType("A[]"));
- }
-
</pre><pre class="diff" id="context"> public void testSamePrimitiveTypeReturnsSameInstance() {
TypeLibrary library = new DefaultTypeLibrary();
</pre><pre class="diff" id="removed">- Type type = library.getType("int");
</pre><pre class="diff" id="added">+ Type type = library.get<span id="addedchars">Object</span>Type("int");
</pre><pre class="diff" id="context">
assertNotNull(type);
</pre><pre class="diff" id="removed">- assertSame(type, library.getType("int"));
</pre><pre class="diff" id="added">+ assertSame(type, library.get<span id="addedchars">Object</span>Type("int"));
</pre><pre class="diff" id="context"> }
public void testCanGetAllReferencedNamespaces() {
TypeLibrary library = new DefaultTypeLibrary();
Set expectedNamespaces = new HashSet();
</pre><pre class="diff" id="removed">- expectedNamespaces.add(library.getType("int").getNamespace());
</pre><pre class="diff" id="added">+ expectedNamespaces.add(library.get<span id="addedchars">Object</span>Type("int").getNamespace());
</pre><pre class="diff" id="context"> assertEquals(expectedNamespaces, library.getNamespaces());
</pre><pre class="diff" id="removed">- expectedNamespaces.add(library.getType("a.b.C").getNamespace());
</pre><pre class="diff" id="added">+ expectedNamespaces.add(library.get<span id="addedchars">Object</span>Type("a.b.C").getNamespace());
</pre><pre class="diff" id="context"> assertEquals(expectedNamespaces, library.getNamespaces());
}
</pre><pre class="diff"><small id="info">@@ -162,7 +158,7 @@
</small></pre><pre class="diff" id="context"> TypeLibrary library = new DefaultTypeLibrary();
assertEquals(9, library.getTypes().size());
</pre><pre class="diff" id="removed">- Type type = library.getType("a.b.A");
</pre><pre class="diff" id="added">+ Type type = library.get<span id="addedchars">Object</span>Type("a.b.A");
</pre><pre class="diff" id="context"> assertTrue(library.getTypes().contains(type));
}
}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">joodi/src<br /></span>
<div class="fileheader"><big><b>.cvsignore</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- .cvsignore 7 Oct 2004 21:15:13 -0000 1.1
+++ .cvsignore 31 Dec 2004 22:50:25 -0000 1.2
@@ -1 +1,2 @@
</small></pre><pre class="diff" id="context"> joodi.iml
</pre><pre class="diff" id="added">+todo.txt
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2004-12-25 11:30:20
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>doc/<a href="#file1">user-guide.xml</a></tt></td><td align="right" id="added">+15</td><td align="right" id="removed">-26</td><td nowrap="nowrap" align="center">1.6 -> 1.7</td></tr>
<tr class="alt"><td><tt>etc/<a href="#file2">xmlbook-html.xsl</a></tt></td><td align="right" id="added">+27</td><td align="right" id="removed">-10</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td><tt> /<a href="#file3">xmlbook.dtd</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr><td></td><td align="right" id="added">+46</td><td align="right" id="removed">-38</td><td></td></tr>
</table>
<small id="info">3 modified files</small><br />
<pre class="comment">
Stylish enhancements to the joodi user guide courtesy of the stylish Mr. Stuart Begg
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/doc<br /></span>
<div class="fileheader"><big><b>user-guide.xml</b></big> <small id="info">1.6 -> 1.7</small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- user-guide.xml 15 Dec 2004 20:04:41 -0000 1.6
+++ user-guide.xml 25 Dec 2004 11:30:04 -0000 1.7
@@ -1,6 +1,6 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: user-guide.xml,v 1.<span id="removedchars">6 2004/12/15 20:04:41</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: user-guide.xml,v 1.<span id="addedchars">7 2004/12/25 11:30:04</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="context">
<?xml-stylesheet type="text/xsl" href="../etc/xmlbook-html.xsl"?>
</pre><pre class="diff"><small id="info">@@ -24,7 +24,7 @@
</small></pre><pre class="diff" id="context"> <p>As mentioned above, one of the nice things about joodi is that you get
traceability to the cause of the design issue. For example, below is a
snippet of a joodi report that detected a cyclic package (joodi calls them namespaces) dependency
</pre><pre class="diff" id="removed">- when run against the java runtime library (<span id="removedchars">rt.jar</span>):</p>
</pre><pre class="diff" id="added">+ when run against the java runtime library (<span id="addedchars"><code>rt.jar</code></span>):</p>
</pre><pre class="diff" id="context"> <p><ref id="fig-rt-jar-cycle-1"/></p>
<p>This shows a chain of packages that form a cycle of dependencies. Imagine you were starting with the source code for just one of these packages and trying to get it to compile. You would find it impossible to compile any single one of them on its own. This is one way to understand why this is a poor design choice.</p>
</section>
</pre><pre class="diff"><small id="info">@@ -45,41 +45,32 @@
</small></pre><pre class="diff" id="context"> </section>
<section title="Getting Started" refid="gettingstarted">
<section title="Downloading" refid="downloading">
</pre><pre class="diff" id="removed">- <p>You can get the software from the <ref id="joodisite"/>. joodi comes packaged in a single .zip or .tar.gz file with everything you need included. All dependent jar files needed to run the software are part of the distribution.</p>
</pre><pre class="diff" id="added">+ <p>You can get the software from the <ref id="joodisite"/>. joodi comes packaged in a single <code>.zip</code> or <code>.tar.gz</code> file with everything you need included. All dependent <code>jar</code> files needed to run the software are part of the distribution.</p>
</pre><pre class="diff" id="context"> </section>
<section title="Building from Source" refid="building">
<p>If you prefer, you can build the software yourself by following the instructions below.</p>
<section title="Getting the Source" refid="getsource">
</pre><pre class="diff" id="removed">- <p>Anonymous CVS access is provided to enable you to get the source code. On the assumption you know what you're doing when it comes to CVS, all you need to know is the repository path, which is</p>
- <p><code>:pserver:ano...@cv...:/cvsroot/joodi</code> </p>
- <p>and the module name which is simply</p>
- <p><code>joodi</code></p>
- <p>So a cvs command like</p>
- <p><code>cvs -d :pserver:ano...@cv...:/cvsroot/joodi checkout joodi</code> </p>
- <p>will do the trick.</p>
</pre><pre class="diff" id="added">+ <p>Anonymous CVS access is provided to enable you to get the source code. On the assumption you know what you're doing when it comes to CVS, all you need to know is the repository path, which is <code>:pserver:ano...@cv...:/cvsroot/joodi</code> and the module name which is simply <code>joodi</code>.</p>
+ <p>So a cvs command like:<command>cvs -d :pserver:ano...@cv...:/cvsroot/joodi checkout joodi</command> will do the trick.</p>
</pre><pre class="diff" id="context"> </section>
<section title="Building with Ant" refid="buildant">
<p>You will need <ref id="ant"/> installed and configured on your system. If you do not have <ref id="ant"/>, you are probably better off using the binary distribution available from the <ref id="joodisite"/>.</p>
</pre><pre class="diff" id="removed">- <p>Open the command shell of your choice in the joodi/src directory. Then just type</p>
- <p><code>ant</code></p>
- <p>to do a complete build of the software. If you get issues with creating a task for <ref id="junit"/>, drop the junit.jar file in your %ANT_HOME%/lib directory and try again.</p>
- <p>After a successful build of the system, you will find the distribution archive in the joodi/build directory. This is the same file that you download if you choose to get the sofware from the <ref id="joodisite"/></p>
</pre><pre class="diff" id="added">+ <p>Open the command shell of your choice in the joodi/src directory. Then just type <command>ant</command> to do a complete build of the software. If you get issues with creating a task for <ref id="junit"/>, drop the <code>junit.jar</code> file in your <code>%ANT_HOME%/lib</code> directory and try again.</p>
+ <p>After a successful build of the system, you will find the distribution archive in the <code>joodi/build</code> directory. This is the same file that you download if you choose to get the sofware from the <ref id="joodisite"/></p>
</pre><pre class="diff" id="context"> </section>
</section>
<section title="Installing" refid="installing">
</pre><pre class="diff" id="removed">- <p>To install joodi, simply extract the contents of the distribution archive into a directory of your choice and open a command shell in the extracted directory. You will know you are in the right place if the joodi <span id="removedchars">jar</span> file is there.</p>
</pre><pre class="diff" id="added">+ <p>To install joodi, simply extract the contents of the distribution archive into a directory of your choice and open a command shell in the extracted directory. You will know you are in the right place if the joodi <span id="addedchars"><code>jar</code></span> file is there.</p>
</pre><pre class="diff" id="context"> </section>
<section title="Running" refid="running">
<p>You will need a <ref id="jre"/> version 1.4 or later to run joodi.</p>
<section title="Getting usage instructions" refid="usage">
</pre><pre class="diff" id="removed">- <p>To get usage instructions, simply launch the joodi jar file with no arguments as follows:</p>
- <p><code>java -jar joodi.jar</code></p>
- <p>Note that the joodi jar filename will be different than that shown here as it will include a version number in its name.</p>
</pre><pre class="diff" id="added">+ <p>To get usage instructions, simply launch the joodi <code>jar</code> file with no arguments as follows: <command>java -jar joodi.jar</command></p>
+ <p>Note that the joodi <code>jar</code> filename will be different from that shown here as it will include a version number in its name.</p>
</pre><pre class="diff" id="context"> </section>
<section title="Analysing a single jar" refid="runsinglejar">
</pre><pre class="diff" id="removed">- <p>To analyse an application packaged in foo.jar and produce a html report named joodi-foo.html, use the following command:</p>
- <p><code>java -jar joodi.jar --out joodi-foo.html foo.jar</code></p>
- <p>You will see output as joodi loads each class file into the rule engine, then executes the rules, and finally finishes processing. Each line of output produced by joodi has the elapsed time in milliseconds displayed at the start of the line. The following figure shows the (edited) output produced when analysing rt.jar.</p>
</pre><pre class="diff" id="added">+ <p>To analyse an application packaged in <code>foo.jar</code> and produce a html report named <code>joodi-foo.html</code>, use the following command: <command>java -jar joodi.jar --out joodi-foo.html foo.jar</command></p>
+ <p>You will see output as joodi loads each class file into the rule engine, then executes the rules, and finally finishes processing. Each line of output produced by joodi has the elapsed time in milliseconds displayed at the start of the line. The following figure shows the (edited) output produced when analysing <code>rt.jar</code>.</p>
</pre><pre class="diff" id="context"> <listing refid="ant"><![CDATA[
Java-based Object-Oriented Design Inferometer 0.1 - http://www.sf.net/projects/joodi
</pre><pre class="diff"><small id="info">@@ -119,11 +110,9 @@
</small></pre><pre class="diff" id="context"> ]]></listing>
</section>
<section title="Analysing a set of jars" refid="runmultiplejar">
</pre><pre class="diff" id="removed">- <p>The easiest way to analyse multiple jars or directories is to passthem as trailing arguments to joodi:</p>
- <p><code>java -jar joodi.jar --out joodi-foo.html foo.jar bar.jar mybuild/classes</code></p>
- <p>To more easily analyse a large set of jars in the directory <code>myjars</code> and produce a html report named joodi-myapp.html, use the following command (you will need <ref id="cygwin"/> under Windows):</p>
- <p><code>find myjars -name '*.jar'|xargs java -jar joodi.jar --out joodi-myapp.html</code></p>
- <p>Either method will analyse all the class files in all the jars as if they were in a single jar.</p>
</pre><pre class="diff" id="added">+ <p>The easiest way to analyse multiple <code>jars</code> or directories is to pass them as trailing arguments to joodi:<command>java -jar joodi.jar --out joodi-foo.html foo.jar bar.jar mybuild/classes</command></p>
+ <p>To more easily analyse a large set of <code>jars</code> in the directory <code>myjars</code> and produce a html report named <code>joodi-myapp.html</code>, use the following command (you will need <ref id="cygwin"/> under Microsoft Windows):<command>find myjars -name '*.jar'|xargs java -jar joodi.jar --out joodi-myapp.html</command></p>
+ <p>Either method will analyse all the class files in all the <code>jars</code> as if they were in a single <code>jar</code>.</p>
</pre><pre class="diff" id="context"> </section>
<section title="Running from an Ant build" refid="runningfromant">
<p>You can use the <ref id="ant"/> <code>&lt;java&gt;</code> task to run joodi from your Ant build. Below is an example:</p>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/etc<br /></span>
<div class="fileheader"><big><b>xmlbook-html.xsl</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- xmlbook-html.xsl 13 Dec 2004 12:39:41 -0000 1.4
+++ xmlbook-html.xsl 25 Dec 2004 11:30:04 -0000 1.5
@@ -1,27 +1,40 @@
</small></pre><pre class="diff" id="context"> <?xml version="1.0"?>
</pre><pre class="diff" id="removed">-<!-- $Id: xmlbook-html.xsl,v 1.<span id="removedchars">4 2004/12/13 12:39:41</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: xmlbook-html.xsl,v 1.<span id="addedchars">5 2004/12/25 11:30:04</span> jimmyjazz Exp $ -->
</pre><pre class="diff" id="context">
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</pre><pre class="diff" id="removed">- <xsl:output method="html"<span id="removedchars">/></span>
</pre><pre class="diff" id="added">+ <xsl:output method="html"
+ omit-xml-declaration="yes"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict/EN"
+ media-type="text/html"/>
</pre><pre class="diff" id="context">
<xsl:template match="/document">
<html>
<head>
<title><xsl:value-of select="@title"/></title>
<style>
</pre><pre class="diff" id="removed">- h1 { padding: 2px; background-color: yellow; }
- h2 { padding: 2px; background-color: #6cf; }
- h3 { padding: 2px; background-color: #ccc; }
</pre><pre class="diff" id="added">+ body { font-family: "Trebuchet MS"; margin: 0px; padding: 0px; }
+ h1 { margin: 0px; padding: 12px; padding-left: 30px; color: white; background-color: #6cf; }
+ #toc { position: absolute; top: 80px; width 200px; left: 830px; }
+ #toc h2 { font-size: 13px; }
+ #toc li { list-style-type: none; margin-left: 0px; padding-left: 0px; }
+ #toc dt { float: left; margin-left: 10px; }
+ #content { padding-left:100px; width: 700px; }
+ #content h2 { margin-top: 15px; margin-left: -80px; padding: 2px; border-bottom: solid 1px #6cf; }
+ #content h3,h4 { margin-left: -80px; padding: 2px; }
+ #content kbd { border: solid 1px #999; background: #eee; padding: 13px; width: 100%; display: block; margin: 3px;}
</pre><pre class="diff" id="context"> p.caption { font-style: italic; }
</style>
</head>
<body>
<h1><xsl:value-of select="@title"/></h1>
<xsl:call-template name="toc"/>
</pre><pre class="diff" id="removed">- <xsl:apply-templates select="section"/>
</pre><pre class="diff" id="added">+ <div id="content">
+ <xsl:apply-templates select="section"/>
+ </div>
</pre><pre class="diff" id="context"> </body>
</html>
</xsl:template>
</pre><pre class="diff"><small id="info">@@ -29,15 +42,15 @@
</small></pre><pre class="diff" id="context"> <xsl:template name="toc">
<div id="toc">
<h2>Table of Contents</h2>
</pre><pre class="diff" id="removed">- <<span id="removedchars">u</span>l>
</pre><pre class="diff" id="added">+ <<span id="addedchars">d</span>l>
</pre><pre class="diff" id="context"> <xsl:for-each select="/document/section">
<li>
<a><xsl:attribute name="href">#<xsl:value-of select="@refid"/></xsl:attribute>
</pre><pre class="diff" id="removed">- <xsl:value-of select="position()"/>. <xsl:value-of select="@title"/>
</pre><pre class="diff" id="added">+ <dt><xsl:value-of select="position()"/>.</dt><dd><xsl:value-of select="@title"/></dd>
</pre><pre class="diff" id="context"> </a>
</li>
</xsl:for-each>
</pre><pre class="diff" id="removed">- </<span id="removedchars">u</span>l>
</pre><pre class="diff" id="added">+ </<span id="addedchars">d</span>l>
</pre><pre class="diff" id="context"> </div>
</xsl:template>
</pre><pre class="diff"><small id="info">@@ -57,7 +70,11 @@
</small></pre><pre class="diff" id="context"> </xsl:template>
<xsl:template match="code">
</pre><pre class="diff" id="removed">- <code><xsl:apply-templates/></code>
</pre><pre class="diff" id="added">+ <samp><xsl:apply-templates/></samp>
+ </xsl:template>
+
+ <xsl:template match="command">
+ <kbd><xsl:apply-templates/></kbd>
</pre><pre class="diff" id="context"> </xsl:template>
<xsl:template match="p">
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/etc<br /></span>
<div class="fileheader"><big><b>xmlbook.dtd</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- xmlbook.dtd 13 Dec 2004 04:55:47 -0000 1.2
+++ xmlbook.dtd 25 Dec 2004 11:30:04 -0000 1.3
@@ -1,4 +1,4 @@
</small></pre><pre class="diff" id="removed">-<!-- $Id: xmlbook.dtd,v 1.2 2004/12/13 04:55:47 adammurdoch Exp $ -->
</pre><pre class="diff" id="added">+<!-- $Id: xmlbook.dtd,v 1.3 2004/12/25 11:30:04 jimmyjazz Exp $ -->
</pre><pre class="diff" id="context">
<!ELEMENT document (section)*>
</pre><pre class="diff"><small id="info">@@ -53,7 +53,7 @@
</small></pre><pre class="diff" id="context"> url CDATA #REQUIRED
>
</pre><pre class="diff" id="removed">-<!ELEMENT p (#PCDATA|em|strong|code|list|ref)*>
</pre><pre class="diff" id="added">+<!ELEMENT p (#PCDATA|em|strong|code|list|ref<span id="addedchars">|command</span>)*>
</pre><pre class="diff" id="context">
<!ELEMENT em (#PCDATA)>
</pre><pre class="diff"><small id="info">@@ -61,6 +61,8 @@
</small></pre><pre class="diff" id="context">
<!ELEMENT code (#PCDATA)>
</pre><pre class="diff" id="added">+<!ELEMENT command (#PCDATA)>
+
</pre><pre class="diff" id="context"> <!ELEMENT list (item)*>
<!ELEMENT item (#PCDATA|ref)*>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2004-12-24 22:45:30
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>test/net/sf/joodi/reporting/<a href="#file1">FileReportWriterTest.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">TransformingReportWriterTest.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt>test/net/sf/joodi/util/<a href="#file3"><span id="added">LocalEntityResolver.java</span></a></tt></td><td align="right" id="added">+58</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt>test/resources/<a href="#file4"><span id="added">xhtml-lat1.ent</span></a></tt></td><td align="right" id="added">+196</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file5"><span id="added">xhtml-special.ent</span></a></tt></td><td align="right" id="added">+80</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file6"><span id="added">xhtml-strict.dtd</span></a></tt></td><td align="right" id="added">+978</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file7"><span id="added">xhtml-symbol.ent</span></a></tt></td><td align="right" id="added">+237</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt><a href="#file8">CHANGES.txt</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.10 -> 1.11</td></tr>
<tr><td></td><td align="right" id="added">+1563</td><td align="right" id="removed">-5</td><td></td></tr>
</table>
<small id="info">5 added + 3 modified, total 8 files</small><br />
<pre class="comment">
Fixed [ 1090936 ] Can't run Ant build offline
Unit tests now use local cache of XHTML DTD resources to allow disconnected builds
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/reporting<br /></span>
<div class="fileheader"><big><b>FileReportWriterTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- FileReportWriterTest.java 23 Dec 2004 12:26:27 -0000 1.4
+++ FileReportWriterTest.java 24 Dec 2004 22:45:20 -0000 1.5
@@ -28,7 +28,9 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.AbstractFileTestCase;
import net.sf.joodi.util.ClassLoaderResourceProvider;
import net.sf.joodi.util.InputStreamMatcher;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.LocalEntityResolver;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="added">+import javax.xml.parsers.DocumentBuilder;
</pre><pre class="diff" id="context"> import javax.xml.parsers.DocumentBuilderFactory;
import java.io.ByteArrayInputStream;
import java.io.File;
</pre><pre class="diff"><small id="info">@@ -37,7 +39,7 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: FileReportWriterTest.java,v 1.<span id="removedchars">4 2004/12/23 12:26:27</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: FileReportWriterTest.java,v 1.<span id="addedchars">5 2004/12/24 22:45:20</span> jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class FileReportWriterTest extends AbstractFileTestCase {
public void testDoesNotOpenFileUntilReportIsStarted() throws FileNotFoundException {
</pre><pre class="diff"><small id="info">@@ -74,7 +76,9 @@
</small></pre><pre class="diff" id="context"> }
try {
</pre><pre class="diff" id="removed">- DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(content));
</pre><pre class="diff" id="added">+ final DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ documentBuilder.setEntityResolver(new LocalEntityResolver());
+ documentBuilder.parse(new ByteArrayInputStream(content));
</pre><pre class="diff" id="context"> } catch (Exception e) {
String testFileName = file.getAbsolutePath();
throw (AssertionFailedError) new AssertionFailedError("File" + testFileName + " is not a well formed document:" + new String(content)).initCause(
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/reporting<br /></span>
<div class="fileheader"><big><b>TransformingReportWriterTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- TransformingReportWriterTest.java 17 Dec 2004 00:54:03 -0000 1.3
+++ TransformingReportWriterTest.java 24 Dec 2004 22:45:20 -0000 1.4
@@ -30,15 +30,17 @@
</small></pre><pre class="diff" id="context"> import net.sf.joodi.facts.FactVisitor;
import net.sf.joodi.util.ClassLoaderResourceProvider;
import net.sf.joodi.util.ResourceProvider;
</pre><pre class="diff" id="added">+import net.sf.joodi.util.LocalEntityResolver;
</pre><pre class="diff" id="context"> import org.easymock.MockControl;
import javax.xml.parsers.DocumentBuilderFactory;
</pre><pre class="diff" id="added">+import javax.xml.parsers.DocumentBuilder;
</pre><pre class="diff" id="context"> import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
</pre><pre class="diff" id="removed">- * @version $Id: TransformingReportWriterTest.java,v 1.3 2004/12/17 00:54:03 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TransformingReportWriterTest.java,v 1.4 2004/12/24 22:45:20 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class TransformingReportWriterTest extends TestCase {
private final MockControl _control = MockControl.createStrictControl(ResourceProviderAndReportDestination.class);
</pre><pre class="diff"><small id="info">@@ -96,7 +98,9 @@
</small></pre><pre class="diff" id="context">
private void assertWellFormedDocument(byte[] content) {
try {
</pre><pre class="diff" id="removed">- DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(content));
</pre><pre class="diff" id="added">+ final DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ documentBuilder.setEntityResolver(new LocalEntityResolver());
+ documentBuilder.parse(new ByteArrayInputStream(content));
</pre><pre class="diff" id="context"> } catch (Exception e) {
throw (AssertionFailedError)new AssertionFailedError("Not a well formed document:" + new String(content)).initCause(e);
}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/util<br /></span>
<div class="fileheader" id="added"><big><b>LocalEntityResolver.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N LocalEntityResolver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ LocalEntityResolver.java 24 Dec 2004 22:45:20 -0000 1.1
@@ -0,0 +1,58 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.util;
+
+import org.apache.crimson.parser.Resolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+/**
+ * @version $Id: LocalEntityResolver.java,v 1.1 2004/12/24 22:45:20 jimmyjazz Exp $
+ */
+public class LocalEntityResolver extends Resolver {
+ private static final String RESOURCE_INDICATOR = "java:resource:";
+
+ public LocalEntityResolver() {
+ // XHTML DTD will be cached locally for offline testing
+ registerCatalogEntry("-//W3C//DTD XHTML 1.0 Strict//EN", "resources/xhtml-strict.dtd", getClass().getClassLoader());
+ }
+
+ /**
+ * The default behaviour of the apache crimson Resolver requires that
+ * resources used to resolve entities must all be explicity regsitered.
+ * This method is here to support automatic registration of local resources
+ * as they are being resolved. This just avoids having to register them in
+ * the constructor.
+ */
+ public InputSource resolveEntity(String name, String uri) throws IOException, SAXException {
+ if (uri != null && uri.startsWith(RESOURCE_INDICATOR)) {
+ String resourceName = uri.substring(RESOURCE_INDICATOR.length());
+ registerCatalogEntry(name, resourceName, getClass().getClassLoader());
+ }
+ return super.resolveEntity(name, uri);
+ }
+}
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="added">joodi/src/test/resources<br /></span>
<div class="fileheader" id="added"><big><b>xhtml-lat1.ent</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N xhtml-lat1.ent
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ xhtml-lat1.ent 24 Dec 2004 22:45:20 -0000 1.1
@@ -0,0 +1,196 @@
</small></pre><pre class="diff" id="added">+<!-- Portions (C) International Organization for Standardization 1986
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+ %HTMLlat1;
+-->
+
+<!ENTITY nbsp "&#160;"> <!-- no-break space = non-breaking space,
+ U+00A0 ISOnum -->
+<!ENTITY iexcl "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+ U+00A6 ISOnum -->
+<!ENTITY sect "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml "&#168;"> <!-- diaeresis = spacing diaeresis,
+ U+00A8 ISOdia -->
+<!ENTITY copy "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo "&#171;"> <!-- left-pointing double angle quotation mark
+ = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not "&#172;"> <!-- not sign = angled dash,
+ U+00AC ISOnum -->
+<!ENTITY shy "&#173;"> <!-- soft hyphen = discretionary hyphen,
+ U+00AD ISOnum -->
+<!ENTITY reg "&#174;"> <!-- registered sign = registered trade mark sign,
+ U+00AE ISOnum -->
+<!ENTITY macr "&#175;"> <!-- macron = spacing macron = overline
+ = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+ U+00B1 ISOnum -->
+<!ENTITY sup2 "&#178;"> <!-- superscript two = superscript digit two
+ = squared, U+00B2 ISOnum -->
+<!ENTITY sup3 "&#179;"> <!-- superscript three = superscript digit three
+ = cubed, U+00B3 ISOnum -->
+<!ENTITY acute "&#180;"> <!-- acute accent = spacing acute,
+ U+00B4 ISOdia -->
+<!ENTITY micro "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para "&#182;"> <!-- pilcrow sign = paragraph sign,
+ U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+ = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1 "&#185;"> <!-- superscript one = superscript digit one,
+ U+00B9 ISOnum -->
+<!ENTITY ordm "&#186;"> <!-- masculine ordinal indicator,
+ U+00BA ISOnum -->
+<!ENTITY raquo "&#187;"> <!-- right-pointing double angle quotation mark
+ = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+ = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+ = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+ = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+ = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+ = latin capital letter A grave,
+ U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+ U+00C1 ISOlat1 -->
+<!ENTITY Acirc "&#194;"> <!-- latin capital letter A with circumflex,
+ U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+ U+00C3 ISOlat1 -->
+<!ENTITY Auml "&#196;"> <!-- latin capital letter A with diaeresis,
+ U+00C4 ISOlat1 -->
+<!ENTITY Aring "&#197;"> <!-- latin capital letter A with ring above
+ = latin capital letter A ring,
+ U+00C5 ISOlat1 -->
+<!ENTITY AElig "&#198;"> <!-- latin capital letter AE
+ = latin capital ligature AE,
+ U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+ U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+ U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+ U+00C9 ISOlat1 -->
+<!ENTITY Ecirc "&#202;"> <!-- latin capital letter E with circumflex,
+ U+00CA ISOlat1 -->
+<!ENTITY Euml "&#203;"> <!-- latin capital letter E with diaeresis,
+ U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+ U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+ U+00CD ISOlat1 -->
+<!ENTITY Icirc "&#206;"> <!-- latin capital letter I with circumflex,
+ U+00CE ISOlat1 -->
+<!ENTITY Iuml "&#207;"> <!-- latin capital letter I with diaeresis,
+ U+00CF ISOlat1 -->
+<!ENTITY ETH "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+ U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+ U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+ U+00D3 ISOlat1 -->
+<!ENTITY Ocirc "&#212;"> <!-- latin capital letter O with circumflex,
+ U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+ U+00D5 ISOlat1 -->
+<!ENTITY Ouml "&#214;"> <!-- latin capital letter O with diaeresis,
+ U+00D6 ISOlat1 -->
+<!ENTITY times "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+ = latin capital letter O slash,
+ U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+ U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+ U+00DA ISOlat1 -->
+<!ENTITY Ucirc "&#219;"> <!-- latin capital letter U with circumflex,
+ U+00DB ISOlat1 -->
+<!ENTITY Uuml "&#220;"> <!-- latin capital letter U with diaeresis,
+ U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+ U+00DD ISOlat1 -->
+<!ENTITY THORN "&#222;"> <!-- latin capital letter THORN,
+ U+00DE ISOlat1 -->
+<!ENTITY szlig "&#223;"> <!-- latin small letter sharp s = ess-zed,
+ U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+ = latin small letter a grave,
+ U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+ U+00E1 ISOlat1 -->
+<!ENTITY acirc "&#226;"> <!-- latin small letter a with circumflex,
+ U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+ U+00E3 ISOlat1 -->
+<!ENTITY auml "&#228;"> <!-- latin small letter a with diaeresis,
+ U+00E4 ISOlat1 -->
+<!ENTITY aring "&#229;"> <!-- latin small letter a with ring above
+ = latin small letter a ring,
+ U+00E5 ISOlat1 -->
+<!ENTITY aelig "&#230;"> <!-- latin small letter ae
+ = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+ U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+ U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+ U+00E9 ISOlat1 -->
+<!ENTITY ecirc "&#234;"> <!-- latin small letter e with circumflex,
+ U+00EA ISOlat1 -->
+<!ENTITY euml "&#235;"> <!-- latin small letter e with diaeresis,
+ U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+ U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+ U+00ED ISOlat1 -->
+<!ENTITY icirc "&#238;"> <!-- latin small letter i with circumflex,
+ U+00EE ISOlat1 -->
+<!ENTITY iuml "&#239;"> <!-- latin small letter i with diaeresis,
+ U+00EF ISOlat1 -->
+<!ENTITY eth "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+ U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+ U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+ U+00F3 ISOlat1 -->
+<!ENTITY ocirc "&#244;"> <!-- latin small letter o with circumflex,
+ U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+ U+00F5 ISOlat1 -->
+<!ENTITY ouml "&#246;"> <!-- latin small letter o with diaeresis,
+ U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+ = latin small letter o slash,
+ U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+ U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+ U+00FA ISOlat1 -->
+<!ENTITY ucirc "&#251;"> <!-- latin small letter u with circumflex,
+ U+00FB ISOlat1 -->
+<!ENTITY uuml "&#252;"> <!-- latin small letter u with diaeresis,
+ U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+ U+00FD ISOlat1 -->
+<!ENTITY thorn "&#254;"> <!-- latin small letter thorn,
+ U+00FE ISOlat1 -->
+<!ENTITY yuml "&#255;"> <!-- latin small letter y with diaeresis,
+ U+00FF ISOlat1 -->
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="added">joodi/src/test/resources<br /></span>
<div class="fileheader" id="added"><big><b>xhtml-special.ent</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N xhtml-special.ent
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ xhtml-special.ent 24 Dec 2004 22:45:20 -0000 1.1
@@ -0,0 +1,80 @@
</small></pre><pre class="diff" id="added">+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+ %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot "&#34;"> <!-- quotation mark, U+0022 ISOnum -->
+<!ENTITY amp "&#38;#38;"> <!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#38;#60;"> <!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt "&#62;"> <!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY apos "&#39;"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig "&#338;"> <!-- latin capital ligature OE,
+ U+0152 ISOlat2 -->
+<!ENTITY oelig "&#339;"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron "&#352;"> <!-- latin capital letter S with caron,
+ U+0160 ISOlat2 -->
+<!ENTITY scaron "&#353;"> <!-- latin small letter s with caron,
+ U+0161 ISOlat2 -->
+<!ENTITY Yuml "&#376;"> <!-- latin capital letter Y with diaeresis,
+ U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ "&#710;"> <!-- modifier letter circumflex accent,
+ U+02C6 ISOpub -->
+<!ENTITY tilde "&#732;"> <!-- small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj "&#8204;"> <!-- zero width non-joiner,
+ U+200C NEW RFC 2070 -->
+<!ENTITY zwj "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo "&#8216;"> <!-- left single quotation mark,
+ U+2018 ISOnum -->
+<!ENTITY rsquo "&#8217;"> <!-- right single quotation mark,
+ U+2019 ISOnum -->
+<!ENTITY sbquo "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo "&#8220;"> <!-- left double quotation mark,
+ U+201C ISOnum -->
+<!ENTITY rdquo "&#8221;"> <!-- right double quotation mark,
+ U+201D ISOnum -->
+<!ENTITY bdquo "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo "&#8249;"> <!-- single left-pointing angle quotation mark,
+ U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo "&#8250;"> <!-- single right-pointing angle quotation mark,
+ U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro "&#8364;"> <!-- euro sign, U+20AC NEW -->
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="added">joodi/src/test/resources<br /></span>
<div class="fileheader" id="added"><big><b>xhtml-strict.dtd</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N xhtml-strict.dtd
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ xhtml-strict.dtd 24 Dec 2004 22:45:20 -0000 1.1
@@ -0,0 +1,978 @@
</small></pre><pre class="diff" id="added">+<!--
+ Extensible HTML version 1.0 Strict DTD
+
+ This is the same as HTML 4 Strict except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+ $Revision: 1.1 $
+ $Date: 2004/12/24 22:45:20 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.pre
+ "br | span | bdo | map">
+
+
+<!ENTITY % special
+ "%special.pre; | object | img ">
+
+<!ENTITY % fontstyle "tt | i | b | big | small ">
+
+<!ENTITY % phrase "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym | sub | sup ">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding big, small, sup or sup -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
+ | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ href %URI; #REQUIRED
+ id ID #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+ Note that in this DTD there is no name attribute. That
+ is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ >
+
+<!ATTLIST caption
+ %attrs;
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname" id="added">joodi/src/test/resources<br /></span>
<div class="fileheader" id="added"><big><b>xhtml-symbol.ent</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N xhtml-symbol.ent
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ xhtml-symbol.ent 24 Dec 2004 22:45:20 -0000 1.1
@@ -0,0 +1,237 @@
</small></pre><pre class="diff" id="added">+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+ %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
...
[truncated message content] |
|
From: James R. <jim...@us...> - 2004-12-23 12:26:35
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/notification/<a href="#file1"><span id="added">CyclicNamespaceUseNotification.java</span></a></tt></td><td align="right" id="added">+67</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2"><span id="added">DescendentNamespaceUseNotification.java</span></a></tt></td><td align="right" id="added">+65</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file3"><span id="added">Notification.java</span></a></tt></td><td align="right" id="added">+34</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file4"><span id="added">SubtypeUseNotification.java</span></a></tt></td><td align="right" id="added">+49</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file5"><span id="removed">CyclicNamespaceUseNotification.java</span></a></tt></td><td></td><td align="right" id="removed">-65</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file6"><span id="removed">DescendentNamespaceUseNotification.java</span></a></tt></td><td></td><td align="right" id="removed">-63</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt> /<a href="#file7"><span id="removed">Notification.java</span></a></tt></td><td></td><td align="right" id="removed">-32</td><td nowrap="nowrap">1.1.1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file8"><span id="removed">SubtypeUseNotification.java</span></a></tt></td><td></td><td align="right" id="removed">-47</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>main/net/sf/joodi/plugins/<a href="#file9">Joodi.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr class="alt"><td><tt> /<a href="#file10">NotificationListener.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>main/net/sf/joodi/rules/drools/<a href="#file11">joodi.drl</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/notification/<a href="#file12"><span id="added">CyclicNamespaceUseNotificationTest.java</span></a></tt></td><td align="right" id="added">+39</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file13"><span id="added">DescendentNamespaceUseNotificationTest.java</span></a></tt></td><td align="right" id="added">+57</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file14"><span id="added">SubtypeUseNotificationTest.java</span></a></tt></td><td align="right" id="added">+41</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt>test/net/sf/joodi/facts/<a href="#file15"><span id="removed">CyclicNamespaceUseNotificationTest.java</span></a></tt></td><td></td><td align="right" id="removed">-37</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file16"><span id="removed">DescendentNamespaceUseNotificationTest.java</span></a></tt></td><td></td><td align="right" id="removed">-51</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file17"><span id="removed">SubtypeUseNotificationTest.java</span></a></tt></td><td></td><td align="right" id="removed">-39</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/plugins/<a href="#file18">NotificationListenerTest.java</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>test/net/sf/joodi/reporting/<a href="#file19">FileReportWriterTest.java</a></tt></td><td align="right" id="added">+8</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/rules/drools/<a href="#file20">NamespaceUseRulesTest.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td></td><td align="right" id="added">+372</td><td align="right" id="removed">-346</td><td></td></tr>
</table>
<small id="info">7 added + 7 removed + 6 modified, total 20 files</small><br />
<pre class="comment">
Separated notifications from other facts in their own package
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>CyclicNamespaceUseNotification.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N CyclicNamespaceUseNotification.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ CyclicNamespaceUseNotification.java 23 Dec 2004 12:26:25 -0000 1.1
@@ -0,0 +1,67 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import net.sf.joodi.facts.FactVisitor;
+import net.sf.joodi.facts.NamespaceUse;
+import net.sf.joodi.util.Assert;
+
+/**
+ * @author <a href="mailto:si...@re...">Simon Harris</a>
+ * @version $Id: CyclicNamespaceUseNotification.java,v 1.1 2004/12/23 12:26:25 jimmyjazz Exp $
+ */
+public class CyclicNamespaceUseNotification implements Notification {
+ private final NamespaceUse _namespaceUse;
+
+ public CyclicNamespaceUseNotification(NamespaceUse namespaceUse) {
+ Assert.isTrue(namespaceUse != null, "namespaceUse can't be null");
+ _namespaceUse = namespaceUse;
+ }
+
+ public void accept(FactVisitor visitor) {
+ Assert.isTrue(visitor != null, "visitor can't be null");
+ visitor.visit("use", _namespaceUse);
+ }
+
+ public int hashCode() {
+ return _namespaceUse.hashCode();
+ }
+
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ } else if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ CyclicNamespaceUseNotification other = (CyclicNamespaceUseNotification) object;
+
+ return _namespaceUse == other._namespaceUse;
+ }
+
+ public String toString() {
+ return "Cyclic Use of " + _namespaceUse.getNamespace();
+ }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>DescendentNamespaceUseNotification.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DescendentNamespaceUseNotification.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DescendentNamespaceUseNotification.java 23 Dec 2004 12:26:25 -0000 1.1
@@ -0,0 +1,65 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import net.sf.joodi.facts.FactVisitor;
+import net.sf.joodi.facts.NamespaceUse;
+import net.sf.joodi.util.Assert;
+
+/**
+ * @version $Id: DescendentNamespaceUseNotification.java,v 1.1 2004/12/23 12:26:25 jimmyjazz Exp $
+ */
+public class DescendentNamespaceUseNotification implements Notification {
+ private final NamespaceUse _use;
+
+ public DescendentNamespaceUseNotification(NamespaceUse use) {
+ _use = use;
+ }
+
+ public boolean equals(Object object) {
+ if (object == this) {
+ return true;
+ }
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+
+ DescendentNamespaceUseNotification other = (DescendentNamespaceUseNotification) object;
+ return other._use.getNamespace() == _use.getNamespace() && other._use.getOn() == _use.getOn();
+ }
+
+ public int hashCode() {
+ return _use.getNamespace().hashCode() ^ _use.getOn().hashCode();
+ }
+
+ public String toString() {
+ return _use.getNamespace() + " Uses Descendent " + _use.getOn();
+ }
+
+ public void accept(FactVisitor visitor) {
+ Assert.isTrue(visitor != null, "visitor can't be null");
+ visitor.visit("use", _use);
+ }
+}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>Notification.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N Notification.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Notification.java 23 Dec 2004 12:26:25 -0000 1.1
@@ -0,0 +1,34 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import net.sf.joodi.facts.Fact;
+
+/**
+ * @author <a href="mailto:si...@re...">Simon Harris</a>
+ * @version $Id: Notification.java,v 1.1 2004/12/23 12:26:25 jimmyjazz Exp $
+ */
+public interface Notification extends Fact {
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>SubtypeUseNotification.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N SubtypeUseNotification.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ SubtypeUseNotification.java 23 Dec 2004 12:26:25 -0000 1.1
@@ -0,0 +1,49 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import net.sf.joodi.facts.FactVisitor;
+import net.sf.joodi.facts.TypeUse;
+import net.sf.joodi.util.Assert;
+
+/**
+ * @version $Id: SubtypeUseNotification.java,v 1.1 2004/12/23 12:26:25 jimmyjazz Exp $
+ */
+public class SubtypeUseNotification implements Notification {
+ private final TypeUse _use;
+
+ public SubtypeUseNotification(TypeUse use) {
+ _use = use;
+ }
+
+ public void accept(FactVisitor visitor) {
+ Assert.isTrue(visitor != null, "visitor can't be null");
+ visitor.visit("use", _use);
+ }
+
+ public String toString() {
+ return "Type " + _use.getUsingType() + " Uses Subtype " + _use.getUsedType();
+ }
+}
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="removed">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>CyclicNamespaceUseNotification.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N CyclicNamespaceUseNotification.java
--- CyclicNamespaceUseNotification.java 14 Dec 2004 06:14:17 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import net.sf.joodi.util.Assert;
-
-/**
- * @author <a href="mailto:si...@re...">Simon Harris</a>
- * @version $Id: CyclicNamespaceUseNotification.java,v 1.4 2004/12/14 06:14:17 adammurdoch Exp $
- */
-public class CyclicNamespaceUseNotification implements Notification {
- private final NamespaceUse _namespaceUse;
-
- public CyclicNamespaceUseNotification(NamespaceUse namespaceUse) {
- Assert.isTrue(namespaceUse != null, "namespaceUse can't be null");
- _namespaceUse = namespaceUse;
- }
-
- public void accept(FactVisitor visitor) {
- Assert.isTrue(visitor != null, "visitor can't be null");
- visitor.visit("use", _namespaceUse);
- }
-
- public int hashCode() {
- return _namespaceUse.hashCode();
- }
-
- public boolean equals(Object object) {
- if (this == object) {
- return true;
- } else if (object == null || getClass() != object.getClass()) {
- return false;
- }
-
- CyclicNamespaceUseNotification other = (CyclicNamespaceUseNotification) object;
-
- return _namespaceUse == other._namespaceUse;
- }
-
- public String toString() {
- return "Cyclic Use of " + _namespaceUse.getNamespace();
- }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="removed">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>DescendentNamespaceUseNotification.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N DescendentNamespaceUseNotification.java
--- DescendentNamespaceUseNotification.java 14 Dec 2004 06:14:17 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import net.sf.joodi.util.Assert;
-
-/**
- * @version $Id: DescendentNamespaceUseNotification.java,v 1.3 2004/12/14 06:14:17 adammurdoch Exp $
- */
-public class DescendentNamespaceUseNotification implements Notification {
- private final NamespaceUse _use;
-
- public DescendentNamespaceUseNotification(NamespaceUse use) {
- _use = use;
- }
-
- public boolean equals(Object object) {
- if (object == this) {
- return true;
- }
- if (object == null || getClass() != object.getClass()) {
- return false;
- }
-
- DescendentNamespaceUseNotification other = (DescendentNamespaceUseNotification) object;
- return other._use.getNamespace() == _use.getNamespace() && other._use.getOn() == _use.getOn();
- }
-
- public int hashCode() {
- return _use.getNamespace().hashCode() ^ _use.getOn().hashCode();
- }
-
- public String toString() {
- return _use.getNamespace() + " Uses Descendent " + _use.getOn();
- }
-
- public void accept(FactVisitor visitor) {
- Assert.isTrue(visitor != null, "visitor can't be null");
- visitor.visit("use", _use);
- }
-}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname" id="removed">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>Notification.java</b></big> <small id="info">removed after 1.1.1.1</small></div>
<pre class="diff"><small id="info">diff -N Notification.java
--- Notification.java 7 Oct 2004 07:32:44 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-/**
- * @author <a href="mailto:si...@re...">Simon Harris</a>
- * @version $Id: Notification.java,v 1.1.1.1 2004/10/07 07:32:44 jimmyjazz Exp $
- */
-public interface Notification extends Fact {
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname" id="removed">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>SubtypeUseNotification.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SubtypeUseNotification.java
--- SubtypeUseNotification.java 14 Dec 2004 23:55:54 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import net.sf.joodi.util.Assert;
-
-/**
- * @version $Id: SubtypeUseNotification.java,v 1.1 2004/12/14 23:55:54 adammurdoch Exp $
- */
-public class SubtypeUseNotification implements Notification {
- private final TypeUse _use;
-
- public SubtypeUseNotification(TypeUse use) {
- _use = use;
- }
-
- public void accept(FactVisitor visitor) {
- Assert.isTrue(visitor != null, "visitor can't be null");
- visitor.visit("use", _use);
- }
-
- public String toString() {
- return "Type " + _use.getUsingType() + " Uses Subtype " + _use.getUsedType();
- }
-}
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins<br /></span>
<div class="fileheader"><big><b>Joodi.java</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- Joodi.java 15 Dec 2004 23:08:19 -0000 1.8
+++ Joodi.java 23 Dec 2004 12:26:26 -0000 1.9
@@ -25,7 +25,7 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.plugins;
import net.sf.joodi.facts.Fact;
</pre><pre class="diff" id="removed">-import net.sf.joodi.facts.Notification;
</pre><pre class="diff" id="added">+import net.sf.joodi.facts.<span id="addedchars">notification.</span>Notification;
</pre><pre class="diff" id="context"> import net.sf.joodi.parser.*;
import net.sf.joodi.reporting.ReportWriter;
import net.sf.joodi.rules.RuleEngine;
</pre><pre class="diff"><small id="info">@@ -39,7 +39,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Iterator;
/**
</pre><pre class="diff" id="removed">- * @version $Id: Joodi.java,v 1.8 2004/12/15 23:08:19 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Joodi.java,v 1.9 2004/12/23 12:26:26 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class Joodi {
private final Log _log;
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/plugins<br /></span>
<div class="fileheader"><big><b>NotificationListener.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- NotificationListener.java 13 Dec 2004 04:26:50 -0000 1.1
+++ NotificationListener.java 23 Dec 2004 12:26:26 -0000 1.2
@@ -26,10 +26,10 @@
</small></pre><pre class="diff" id="context">
import net.sf.joodi.reporting.ReportWriter;
import net.sf.joodi.facts.Fact;
</pre><pre class="diff" id="removed">-import net.sf.joodi.facts.Notification;
</pre><pre class="diff" id="added">+import net.sf.joodi.facts.<span id="addedchars">notification.</span>Notification;
</pre><pre class="diff" id="context">
/**
</pre><pre class="diff" id="removed">- * @version $Id: NotificationListener.java,v 1.1 2004/12/13 04:26:50 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NotificationListener.java,v 1.2 2004/12/23 12:26:26 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class NotificationListener implements ReportWriter {
private int _notifications;
</pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>joodi.drl</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- joodi.drl 16 Dec 2004 01:33:56 -0000 1.8
+++ joodi.drl 23 Dec 2004 12:26:26 -0000 1.9
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context">
<!--
@author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- @version $Id: joodi.drl,v 1.8 2004/12/16 01:33:56 adammurdoch Exp $
</pre><pre class="diff" id="added">+ @version $Id: joodi.drl,v 1.9 2004/12/23 12:26:26 jimmyjazz Exp $
</pre><pre class="diff" id="context"> -->
<rule-set name="JOODI Rules"
</pre><pre class="diff"><small id="info">@@ -25,6 +25,7 @@
</small></pre><pre class="diff" id="context">
<java:import>net.sf.joodi.parser.TypeLibrary</java:import>
<java:import>net.sf.joodi.facts.*</java:import>
</pre><pre class="diff" id="added">+ <java:import>net.sf.joodi.facts.notification.*</java:import>
</pre><pre class="diff" id="context">
<rule name="Primitive Types Are Serializable">
<parameter identifier="typeLibrary">
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>CyclicNamespaceUseNotificationTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N CyclicNamespaceUseNotificationTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ CyclicNamespaceUseNotificationTest.java 23 Dec 2004 12:26:27 -0000 1.1
@@ -0,0 +1,39 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import junit.framework.TestCase;
+import net.sf.joodi.facts.notification.CyclicNamespaceUseNotification;
+import net.sf.joodi.facts.Fixtures;
+
+/**
+ * @version $Id: CyclicNamespaceUseNotificationTest.java,v 1.1 2004/12/23 12:26:27 jimmyjazz Exp $
+ */
+public class CyclicNamespaceUseNotificationTest extends TestCase {
+ public void testNotificationHasUsefulStringRepresentation() {
+ CyclicNamespaceUseNotification notification= new CyclicNamespaceUseNotification(Fixtures.P_USES_R);
+ assertEquals("Cyclic Use of Namespace " + Fixtures.NAMESPACE_P.getName(), notification.toString());
+ }
+}
</pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>DescendentNamespaceUseNotificationTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DescendentNamespaceUseNotificationTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DescendentNamespaceUseNotificationTest.java 23 Dec 2004 12:26:27 -0000 1.1
@@ -0,0 +1,57 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import junit.framework.TestCase;
+import net.sf.joodi.facts.notification.DescendentNamespaceUseNotification;
+import net.sf.joodi.facts.Fixtures;
+import net.sf.joodi.facts.Type;
+import net.sf.joodi.facts.SimpleType;
+import net.sf.joodi.facts.DirectNamespaceUse;
+import net.sf.joodi.facts.DummyTypeUse;
+
+/**
+ * @version $Id: DescendentNamespaceUseNotificationTest.java,v 1.1 2004/12/23 12:26:27 jimmyjazz Exp $
+ */
+public class DescendentNamespaceUseNotificationTest extends TestCase {
+ public void testNotificationHasUsefulStringRepresentation() {
+ DescendentNamespaceUseNotification notification = new DescendentNamespaceUseNotification(Fixtures.P_USES_Q);
+ assertEquals(
+ "Namespace " + Fixtures.NAMESPACE_P.getName() + " Uses Descendent Namespace "
+ + Fixtures.NAMESPACE_Q.getName(),
+ notification.toString());
+ }
+
+ public void testNotificationsWithSameNamespacesAreEqual() {
+ Type type1 = new SimpleType("A", Fixtures.NAMESPACE_P);
+ Type type2 = new SimpleType("B", Fixtures.NAMESPACE_Q);
+ Type type3 = new SimpleType("C", Fixtures.NAMESPACE_Q);
+ DescendentNamespaceUseNotification notification = new DescendentNamespaceUseNotification(
+ new DirectNamespaceUse(new DummyTypeUse(type1, type2)));
+ DescendentNamespaceUseNotification other = new DescendentNamespaceUseNotification(
+ new DirectNamespaceUse(new DummyTypeUse(type1, type3)));
+ assertEquals(notification, other);
+ }
+}
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts/notification<br /></span>
<div class="fileheader" id="added"><big><b>SubtypeUseNotificationTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N SubtypeUseNotificationTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ SubtypeUseNotificationTest.java 23 Dec 2004 12:26:27 -0000 1.1
@@ -0,0 +1,41 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts.notification;
+
+import junit.framework.TestCase;
+import net.sf.joodi.facts.notification.SubtypeUseNotification;
+import net.sf.joodi.facts.Fixtures;
+
+/**
+ * @version $Id: SubtypeUseNotificationTest.java,v 1.1 2004/12/23 12:26:27 jimmyjazz Exp $
+ */
+public class SubtypeUseNotificationTest extends TestCase {
+ public void testNotificationHasUsefulStringRepresentation() {
+ SubtypeUseNotification notification
+ = new SubtypeUseNotification(Fixtures.createTypeUse(Fixtures.TYPE_A, Fixtures.TYPE_B));
+ assertEquals("Type " + Fixtures.TYPE_A.getName() + " Uses Subtype " + Fixtures.TYPE_B.getName(),
+ notification.toString());
+ }
+}
</pre></div>
<hr /><a name="file15" /><div class="file">
<span class="pathname" id="removed">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>CyclicNamespaceUseNotificationTest.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N CyclicNamespaceUseNotificationTest.java
--- CyclicNamespaceUseNotificationTest.java 13 Dec 2004 06:13:17 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Id: CyclicNamespaceUseNotificationTest.java,v 1.1 2004/12/13 06:13:17 adammurdoch Exp $
- */
-public class CyclicNamespaceUseNotificationTest extends TestCase {
- public void testNotificationHasUsefulStringRepresentation() {
- CyclicNamespaceUseNotification notification= new CyclicNamespaceUseNotification(Fixtures.P_USES_R);
- assertEquals("Cyclic Use of Namespace " + Fixtures.NAMESPACE_P.getName(), notification.toString());
- }
-}
</pre></div>
<hr /><a name="file16" /><div class="file">
<span class="pathname" id="removed">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>DescendentNamespaceUseNotificationTest.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N DescendentNamespaceUseNotificationTest.java
--- DescendentNamespaceUseNotificationTest.java 14 Dec 2004 03:24:45 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Id: DescendentNamespaceUseNotificationTest.java,v 1.2 2004/12/14 03:24:45 adammurdoch Exp $
- */
-public class DescendentNamespaceUseNotificationTest extends TestCase {
- public void testNotificationHasUsefulStringRepresentation() {
- DescendentNamespaceUseNotification notification = new DescendentNamespaceUseNotification(Fixtures.P_USES_Q);
- assertEquals(
- "Namespace " + Fixtures.NAMESPACE_P.getName() + " Uses Descendent Namespace "
- + Fixtures.NAMESPACE_Q.getName(),
- notification.toString());
- }
-
- public void testNotificationsWithSameNamespacesAreEqual() {
- Type type1 = new SimpleType("A", Fixtures.NAMESPACE_P);
- Type type2 = new SimpleType("B", Fixtures.NAMESPACE_Q);
- Type type3 = new SimpleType("C", Fixtures.NAMESPACE_Q);
- DescendentNamespaceUseNotification notification = new DescendentNamespaceUseNotification(
- new DirectNamespaceUse(new DummyTypeUse(type1, type2)));
- DescendentNamespaceUseNotification other = new DescendentNamespaceUseNotification(
- new DirectNamespaceUse(new DummyTypeUse(type1, type3)));
- assertEquals(notification, other);
- }
-}
</pre></div>
<hr /><a name="file17" /><div class="file">
<span class="pathname" id="removed">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>SubtypeUseNotificationTest.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SubtypeUseNotificationTest.java
--- SubtypeUseNotificationTest.java 14 Dec 2004 23:55:56 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Id: SubtypeUseNotificationTest.java,v 1.1 2004/12/14 23:55:56 adammurdoch Exp $
- */
-public class SubtypeUseNotificationTest extends TestCase {
- public void testNotificationHasUsefulStringRepresentation() {
- SubtypeUseNotification notification
- = new SubtypeUseNotification(Fixtures.createTypeUse(Fixtures.TYPE_A, Fixtures.TYPE_B));
- assertEquals("Type " + Fixtures.TYPE_A.getName() + " Uses Subtype " + Fixtures.TYPE_B.getName(),
- notification.toString());
- }
-}
</pre></div>
<hr /><a name="file18" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/plugins<br /></span>
<div class="fileheader"><big><b>NotificationListenerTest.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- NotificationListenerTest.java 13 Dec 2004 04:26:51 -0000 1.1
+++ NotificationListenerTest.java 23 Dec 2004 12:26:27 -0000 1.2
@@ -25,12 +25,12 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.plugins;
import junit.framework.TestCase;
</pre><pre class="diff" id="removed">-import net.sf.joodi.facts.Notification;
</pre><pre class="diff" id="added">+import net.sf.joodi.facts.<span id="addedchars">notification.</span>Notification;
</pre><pre class="diff" id="context"> import net.sf.joodi.facts.FactVisitor;
import net.sf.joodi.facts.Fact;
/**
</pre><pre class="diff" id="removed">- * @version $Id: NotificationListenerTest.java,v 1.1 2004/12/13 04:26:51 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NotificationListenerTest.java,v 1.2 2004/12/23 12:26:27 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class NotificationListenerTest extends TestCase {
public void testHandlesNoNotifications() {
</pre></div>
<hr /><a name="file19" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/reporting<br /></span>
<div class="fileheader"><big><b>FileReportWriterTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- FileReportWriterTest.java 17 Dec 2004 00:54:03 -0000 1.3
+++ FileReportWriterTest.java 23 Dec 2004 12:26:27 -0000 1.4
@@ -26,15 +26,18 @@
</small></pre><pre class="diff" id="context">
import junit.framework.AssertionFailedError;
import net.sf.joodi.AbstractFileTestCase;
</pre><pre class="diff" id="removed">-import net.sf.joodi.util.InputStreamMatcher;
</pre><pre class="diff" id="context"> import net.sf.joodi.util.ClassLoaderResourceProvider;
import net.sf.joodi.util.InputStreamMatcher;
import javax.xml.parsers.DocumentBuilderFactory;
</pre><pre class="diff" id="removed">-import java.io.*;
</pre><pre class="diff" id="added">+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
</pre><pre class="diff" id="context">
/**
</pre><pre class="diff" id="removed">- * @version $Id: FileReportWriterTest.java,v 1.3 2004/12/17 00:54:03 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: FileReportWriterTest.java,v 1.4 2004/12/23 12:26:27 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class FileReportWriterTest extends AbstractFileTestCase {
public void testDoesNotOpenFileUntilReportIsStarted() throws FileNotFoundException {
</pre><pre class="diff"><small id="info">@@ -73,7 +76,8 @@
</small></pre><pre class="diff" id="context"> try {
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(content));
} catch (Exception e) {
</pre><pre class="diff" id="removed">- throw (AssertionFailedError) new AssertionFailedError("Not a well formed document:" + new String(content)).initCause(
</pre><pre class="diff" id="added">+ String testFileName = file.getAbsolutePath();
+ throw (AssertionFailedError) new AssertionFailedError("File" + testFileName + " is not a well formed document:" + new String(content)).initCause(
</pre><pre class="diff" id="context"> e);
}
}
</pre></div>
<hr /><a name="file20" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>NamespaceUseRulesTest.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- NamespaceUseRulesTest.java 17 Dec 2004 01:55:56 -0000 1.4
+++ NamespaceUseRulesTest.java 23 Dec 2004 12:26:28 -0000 1.5
@@ -25,10 +25,13 @@
</small></pre><pre class="diff" id="context"> package net.sf.joodi.rules.drools;
import net.sf.joodi.facts.*;
</pre><pre class="diff" id="added">+import net.sf.joodi.facts.notification.Notification;
+import net.sf.joodi.facts.notification.DescendentNamespaceUseNotification;
+import net.sf.joodi.facts.notification.CyclicNamespaceUseNotification;
</pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceUseRulesTest.java,v 1.4 2004/12/17 01:55:56 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceUseRulesTest.java,v 1.5 2004/12/23 12:26:28 jimmyjazz Exp $
</pre><pre class="diff" id="context"> */
public class NamespaceUseRulesTest extends AbstractDroolsTestCase {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: James R. <jim...@us...> - 2004-12-21 20:21:11
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src/conf</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">build.properties</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
</table>
<pre class="comment">
changed build number after tag and release of 0.1
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">joodi/src/conf<br /></span>
<div class="fileheader"><big><b>build.properties</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- build.properties 12 Dec 2004 00:15:05 -0000 1.5
+++ build.properties 21 Dec 2004 20:21:04 -0000 1.6
@@ -1,6 +1,6 @@
</small></pre><pre class="diff" id="removed">-# $Id: build.properties,v 1.<span id="removedchars">5 2004/12/12 00:15:05</span> jimmyjazz Exp $
</pre><pre class="diff" id="added">+# $Id: build.properties,v 1.<span id="addedchars">6 2004/12/21 20:21:04</span> jimmyjazz Exp $
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">-build.number=0.<span id="removedchars">1</span>
</pre><pre class="diff" id="added">+build.number=0.<span id="addedchars">2-alpha</span>
</pre><pre class="diff" id="context"> product.id=JOODI
product.title=Java-based Object-Oriented Design Inferometer
product.name=${product.id} - ${product.title}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|
|
From: Adam M. <ada...@us...> - 2004-12-17 01:56:03
|
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>joodi/src</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>main/net/sf/joodi/facts/<a href="#file1"><span id="added">DefaultNamespace.java</span></a></tt></td><td align="right" id="added">+138</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr class="alt"><td><tt> /<a href="#file2">AbstractType.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr><td><tt> /<a href="#file3">ArrayType.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr class="alt"><td><tt> /<a href="#file4">DirectNamespaceUse.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.5 -> 1.6</td></tr>
<tr><td><tt> /<a href="#file5">Namespace.java</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-87</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file6">NamespaceUse.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1.1.1 -> 1.2</td></tr>
<tr><td><tt> /<a href="#file7">PrimitiveType.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file8">SimpleType.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr><td><tt> /<a href="#file9">TransitiveNamespaceUse.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.4 -> 1.5</td></tr>
<tr class="alt"><td><tt> /<a href="#file10">Type.java</a></tt></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.9 -> 1.10</td></tr>
<tr><td><tt>main/net/sf/joodi/parser/<a href="#file11">DefaultTypeLibrary.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/facts/<a href="#file12"><span id="added">DefaultNamespaceTest.java</span></a></tt></td><td align="right" id="added">+151</td><td></td><td nowrap="nowrap" align="right">added 1.1</td></tr>
<tr><td><tt> /<a href="#file13">AbstractTypeTest.java</a></tt></td><td align="right" id="added">+9</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file14">Fixtures.java</a></tt></td><td align="right" id="added">+7</td><td align="right" id="removed">-7</td><td nowrap="nowrap" align="center">1.8 -> 1.9</td></tr>
<tr><td><tt> /<a href="#file15">PrimitiveTypeTest.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr class="alt"><td><tt> /<a href="#file16">SimpleTypeTest.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.7 -> 1.8</td></tr>
<tr><td><tt> /<a href="#file17"><span id="removed">NamespaceTest.java</span></a></tt></td><td></td><td align="right" id="removed">-151</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>test/net/sf/joodi/parser/<a href="#file18">NamespaceFactBuilderTest.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td><tt>test/net/sf/joodi/rules/drools/<a href="#file19">NamespaceUseRulesTest.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center">1.3 -> 1.4</td></tr>
<tr><td></td><td align="right" id="added">+349</td><td align="right" id="removed">-285</td><td></td></tr>
</table>
<small id="info">2 added + 1 removed + 16 modified, total 19 files</small><br />
<div class="tasklist"><ul>
<li><a href="#task1">TODO - prefer shortest path</a></li>
</ul></div>
<pre class="comment">
Made Namespace an interface, to break transitive dependency of NamespaceUse on its subclasses:
NamespaceUse -> Namespace -> TransitiveNamespaceUse -> DirectNamespaceUse -> AbstractNamespaceUse
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>DefaultNamespace.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultNamespace.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultNamespace.java 17 Dec 2004 01:55:53 -0000 1.1
@@ -0,0 +1,138 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import net.sf.joodi.util.Assert;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:si...@re...">Simon Harris</a>
+ * @version $Id: DefaultNamespace.java,v 1.1 2004/12/17 01:55:53 adammurdoch Exp $
+ */
+public class DefaultNamespace implements Namespace {
+ private final String _name;
+ private final String _childPrefix;
+ private final Set _namespaceUses = new HashSet();
+
+ public DefaultNamespace(String name) {
+ Assert.isTrue(name != null, "name can't be null");
+ _name = name.intern();
+ if (_name.length() > 0) {
+ _childPrefix = _name + '.';
+ } else {
+ _childPrefix = "";
+ }
+ }
+
+ public String getName() {
+ return _name;
+ }
+
+ public void accept(FactVisitor visitor) {
+ }
+
+ public String toString() {
+ if (_name.length() > 0) {
+ return "Namespace " + _name;
+ } else {
+ return "Namespace <default>";
+ }
+ }
+
+ public Set getNamespaceUses() {
+ return _namespaceUses;
+ }
+
+ /**
+ * Adds a namespace use to this namespace.
+ */
+ public void addNamespaceUse(DirectNamespaceUse use) {
+ Assert.isTrue(use != null, "use can't be null");
+ Assert.isTrue(use.getNamespace() == this, "Using namespace must be this.");
+ if (use.getOn() != this) {
+ _namespaceUses.add(use);
+ }
+ }
+
+ /**
+ * Determines if this namespace directly uses the given namespace.
+ * @return The usage, if any. Returns null if this namespace does not use the given namespace.
+ */
+ public NamespaceUse usesNamespace(Namespace namespace) {
+ for (Iterator iterator = _namespaceUses.iterator(); iterator.hasNext();) {
+ DirectNamespaceUse use = (DirectNamespaceUse) iterator.next();
+ if (use.getOn() == namespace) {
+ return use;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Determines if this namespace depends on the given namespace (ie directly uses the namespace or a
+ * namespace that depends on the given namespace).
<a name="task1" />+ * <span class="task">TODO</span> - prefer shortest path
+ *
+ * @return The usage, if any. Returns null if this namespace does not depend on the given namespace.
+ */
+ public NamespaceUse dependsOnNamespace(Namespace namespace) {
+ return doDependsOn(this, new HashSet(), namespace);
+ }
+
+ private NamespaceUse doDependsOn(Namespace from, Set visited, Namespace namespace) {
+ if (visited.contains(from)) {
+ return null;
+ }
+
+ visited.add(from);
+
+ NamespaceUse dependency = null;
+ for (Iterator iterator = from.getNamespaceUses().iterator(); iterator.hasNext();) {
+ DirectNamespaceUse use = (DirectNamespaceUse) iterator.next();
+ if (use.getOn() == namespace) {
+ dependency = use;
+ break;
+ }
+ NamespaceUse indirectUse = doDependsOn(use.getOn(), visited, namespace);
+ if (indirectUse != null) {
+ dependency = new TransitiveNamespaceUse(use, indirectUse);
+ break;
+ }
+ }
+
+ return dependency;
+ }
+
+ /**
+ * Returns true if the given namespace is a descendent of this namespace.
+ */
+ public boolean isDescendent(Namespace namespace) {
+ Assert.isTrue(namespace != null, "namespace can't be null");
+ return namespace.getName().startsWith(_childPrefix);
+ }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>AbstractType.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- AbstractType.java 17 Dec 2004 00:55:18 -0000 1.4
+++ AbstractType.java 17 Dec 2004 01:55:53 -0000 1.5
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context"> import java.util.*;
/**
</pre><pre class="diff" id="removed">- * @version $Id: AbstractType.java,v 1.<span id="removedchars">4 2004/12/17 00:55:18</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: AbstractType.java,v 1.<span id="addedchars">5 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public abstract class AbstractType implements Type {
private final String _name;
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>ArrayType.java</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- ArrayType.java 16 Dec 2004 05:43:44 -0000 1.7
+++ ArrayType.java 17 Dec 2004 01:55:53 -0000 1.8
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: ArrayType.java,v 1.<span id="removedchars">7 2004/12/16 05:43:44</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: ArrayType.java,v 1.<span id="addedchars">8 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class ArrayType extends AbstractType implements Type, TypeUse {
private final Type _elementType;
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>DirectNamespaceUse.java</b></big> <small id="info">1.5 -> 1.6</small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- DirectNamespaceUse.java 8 Dec 2004 04:57:56 -0000 1.5
+++ DirectNamespaceUse.java 17 Dec 2004 01:55:53 -0000 1.6
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DirectNamespaceUse.java,v 1.<span id="removedchars">5 2004/12/08 04:57:56</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DirectNamespaceUse.java,v 1.<span id="addedchars">6 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DirectNamespaceUse extends AbstractNamespaceUse {
private final TypeUse _typeUse;
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Namespace.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- Namespace.java 14 Dec 2004 06:14:17 -0000 1.4
+++ Namespace.java 17 Dec 2004 01:55:53 -0000 1.5
@@ -24,111 +24,35 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.facts;
</pre><pre class="diff" id="removed">-import net.sf.joodi.util.Assert;
-
</pre><pre class="diff" id="context"> import java.util.Set;
</pre><pre class="diff" id="removed">-import java.util.HashSet;
-import java.util.Iterator;
</pre><pre class="diff" id="context">
/**
</pre><pre class="diff" id="removed">- * @author <a href="mailto:si...@re...">Simon Harris</a>
- * @version $Id: Namespace.java,v 1.4 2004/12/14 06:14:17 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Namespace.java,v 1.5 2004/12/17 01:55:53 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
</pre><pre class="diff" id="removed">-public class Namespace implements Fact {
- private final String _name;
- private final String _childPrefix;
- private final Set _namespaceUses = new HashSet();
-
- public Namespace(String name) {
- Assert.isTrue(name != null, "name can't be null");
- _name = name.intern();
- if (_name.length() > 0) {
- _childPrefix = _name + '.';
- } else {
- _childPrefix = "";
- }
- }
-
- public String getName() {
- return _name;
- }
-
- public void accept(FactVisitor visitor) {
- }
-
- public String toString() {
- if (_name.length() > 0) {
- return "Namespace " + _name;
- } else {
- return "Namespace <default>";
- }
- }
</pre><pre class="diff" id="added">+public interface Namespace extends Fact {
+ String getName();
</pre><pre class="diff" id="context">
/**
</pre><pre class="diff" id="removed">- * Adds a namespace use to this namespace.
</pre><pre class="diff" id="added">+ * Returns the direct uses of this namespace.
+ * @return A set of {@link NamespaceUse} facts.
</pre><pre class="diff" id="context"> */
</pre><pre class="diff" id="removed">- public void addNamespaceUse(DirectNamespaceUse use) {
- Assert.isTrue(use != null, "use can't be null");
- Assert.isTrue(use.getNamespace() == this, "Using namespace must be this.");
- if (use.getOn() != this) {
- _namespaceUses.add(use);
- }
- }
-
</pre><pre class="diff" id="added">+ Set getNamespaceUses();
+
</pre><pre class="diff" id="context"> /**
* Determines if this namespace directly uses the given namespace.
* @return The usage, if any. Returns null if this namespace does not use the given namespace.
*/
</pre><pre class="diff" id="removed">- public DirectNamespaceUse usesNamespace(Namespace namespace) {
- for (Iterator iterator = _namespaceUses.iterator(); iterator.hasNext();) {
- DirectNamespaceUse use = (DirectNamespaceUse) iterator.next();
- if (use.getOn() == namespace) {
- return use;
- }
- }
- return null;
- }
</pre><pre class="diff" id="added">+ NamespaceUse usesNamespace(Namespace namespace);
</pre><pre class="diff" id="context">
/**
* Determines if this namespace depends on the given namespace (ie directly uses the namespace or a
* namespace that depends on the given namespace).
</pre><pre class="diff" id="removed">- * TODO - prefer shortest path
- *
</pre><pre class="diff" id="context"> * @return The usage, if any. Returns null if this namespace does not depend on the given namespace.
*/
</pre><pre class="diff" id="removed">- public NamespaceUse dependsOnNamespace(Namespace namespace) {
- return doDependsOn(namespace, new HashSet());
- }
-
- private NamespaceUse doDependsOn(Namespace namespace, Set visited) {
- if (visited.contains(this)) {
- return null;
- }
-
- visited.add(this);
-
- NamespaceUse dependency = null;
- for (Iterator iterator = _namespaceUses.iterator(); iterator.hasNext();) {
- DirectNamespaceUse use = (DirectNamespaceUse) iterator.next();
- if (use.getOn() == namespace) {
- dependency = use;
- break;
- }
- NamespaceUse indirectUse = use.getOn().doDependsOn(namespace, visited);
- if (indirectUse != null) {
- dependency = new TransitiveNamespaceUse(use, indirectUse);
- break;
- }
- }
-
- return dependency;
- }
</pre><pre class="diff" id="added">+ NamespaceUse dependsOnNamespace(Namespace namespace);
</pre><pre class="diff" id="context">
/**
* Returns true if the given namespace is a descendent of this namespace.
*/
</pre><pre class="diff" id="removed">- public boolean isDescendent(Namespace namespace) {
- Assert.isTrue(namespace != null, "namespace can't be null");
- return namespace.getName().startsWith(_childPrefix);
- }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre><pre class="diff" id="added">+ boolean isDescendent(Namespace namespace);
+}
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>NamespaceUse.java</b></big> <small id="info">1.1.1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1.1.1 -r1.2
--- NamespaceUse.java 7 Oct 2004 07:32:44 -0000 1.1.1.1
+++ NamespaceUse.java 17 Dec 2004 01:55:53 -0000 1.2
@@ -26,7 +26,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceUse.java,v 1.1.1.1 2004/10/07 07:32:44 jimmyjazz Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceUse.java,v 1.2 2004/12/17 01:55:53 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public interface NamespaceUse extends Fact {
public Namespace getNamespace();
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>PrimitiveType.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- PrimitiveType.java 16 Dec 2004 05:43:44 -0000 1.3
+++ PrimitiveType.java 17 Dec 2004 01:55:53 -0000 1.4
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Collections;
/**
</pre><pre class="diff" id="removed">- * @version $Id: PrimitiveType.java,v 1.<span id="removedchars">3 2004/12/16 05:43:44</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: PrimitiveType.java,v 1.<span id="addedchars">4 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class PrimitiveType extends AbstractType implements Type {
public PrimitiveType(String name, Namespace namespace) {
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>SimpleType.java</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- SimpleType.java 16 Dec 2004 05:43:44 -0000 1.7
+++ SimpleType.java 17 Dec 2004 01:55:53 -0000 1.8
@@ -30,13 +30,13 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: SimpleType.java,v 1.<span id="removedchars">7 2004/12/16 05:43:44</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: SimpleType.java,v 1.<span id="addedchars">8 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class SimpleType extends AbstractType implements Type {
private final Set _typeUsages = new HashSet();
private final Set _superTypes = new HashSet();
</pre><pre class="diff" id="removed">- public SimpleType(String name, Namespace namespace) {
</pre><pre class="diff" id="added">+ public SimpleType(String name, <span id="addedchars">Default</span>Namespace namespace) {
</pre><pre class="diff" id="context"> super(name, namespace);
}
</pre><pre class="diff"><small id="info">@@ -59,7 +59,8 @@
</small></pre><pre class="diff" id="context"> Assert.isTrue(typeUse.getUsingType() == this, "Using type must be this.");
if (typeUse.getUsedType() != this) {
_typeUsages.add(typeUse);
</pre><pre class="diff" id="removed">- getNamespace().addNamespaceUse(new DirectNamespaceUse(typeUse));
</pre><pre class="diff" id="added">+ DefaultNamespace namespace = (DefaultNamespace) getNamespace();
+ namespace.addNamespaceUse(new DirectNamespaceUse(typeUse));
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>TransitiveNamespaceUse.java</b></big> <small id="info">1.4 -> 1.5</small></div>
<pre class="diff"><small id="info">diff -u -r1.4 -r1.5
--- TransitiveNamespaceUse.java 8 Dec 2004 04:57:56 -0000 1.4
+++ TransitiveNamespaceUse.java 17 Dec 2004 01:55:53 -0000 1.5
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: TransitiveNamespaceUse.java,v 1.<span id="removedchars">4 2004/12/08 04:57:56</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: TransitiveNamespaceUse.java,v 1.<span id="addedchars">5 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class TransitiveNamespaceUse extends AbstractNamespaceUse {
private final DirectNamespaceUse _lhs;
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Type.java</b></big> <small id="info">1.9 -> 1.10</small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- Type.java 16 Dec 2004 05:43:44 -0000 1.9
+++ Type.java 17 Dec 2004 01:55:53 -0000 1.10
@@ -28,7 +28,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: Type.java,v 1.<span id="removedchars">9 2004/12/16 05:43:44</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Type.java,v 1.<span id="addedchars">10 2004/12/17 01:55:53</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public interface Type extends Fact {
String getName();
</pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname">joodi/src/main/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>DefaultTypeLibrary.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- DefaultTypeLibrary.java 15 Dec 2004 23:34:34 -0000 1.2
+++ DefaultTypeLibrary.java 17 Dec 2004 01:55:54 -0000 1.3
@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: DefaultTypeLibrary.java,v 1.<span id="removedchars">2 2004/12/15 23:34:3</span>4 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: DefaultTypeLibrary.java,v 1.<span id="addedchars">3 2004/12/17 01:55:5</span>4 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class DefaultTypeLibrary implements TypeLibrary {
private final Map _typesByName = new HashMap();
</pre><pre class="diff"><small id="info">@@ -112,11 +112,11 @@
</small></pre><pre class="diff" id="context"> return type;
}
</pre><pre class="diff" id="removed">- private Namespace getNamespace(String typeName) {
</pre><pre class="diff" id="added">+ private <span id="addedchars">Default</span>Namespace getNamespace(String typeName) {
</pre><pre class="diff" id="context"> String namespaceName = extractNamespaceName(typeName);
</pre><pre class="diff" id="removed">- Namespace namespace = (Namespace) _namespacesByName.get(namespaceName);
</pre><pre class="diff" id="added">+ DefaultNamespace namespace = (DefaultNamespace) _namespacesByName.get(namespaceName);
</pre><pre class="diff" id="context"> if (namespace == null) {
</pre><pre class="diff" id="removed">- namespace = new Namespace(namespaceName);
</pre><pre class="diff" id="added">+ namespace = new <span id="addedchars">Default</span>Namespace(namespaceName);
</pre><pre class="diff" id="context"> _namespacesByName.put(namespaceName, namespace);
}
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname" id="added">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="added"><big><b>DefaultNamespaceTest.java</b></big> <small id="info">added at 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultNamespaceTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultNamespaceTest.java 17 Dec 2004 01:55:55 -0000 1.1
@@ -0,0 +1,151 @@
</small></pre><pre class="diff" id="added">+/**
+ * JOODI - Java-based Object-Oriented Design Inferometer
+ *
+ * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
+ *
+ * Redistributions in source code form must reproduce the above copyright and
+ * this condition.
+ *
+ * The contents of this file are subject to the GNU General Public License,
+ * Version 2 (the "License"); you may not use this file except in compliance
+ * with the License. A copy of the License is available at
+ * http://www.opensource.org/licenses/gpl-license.php.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.sf.joodi.facts;
+
+import junit.framework.TestCase;
+import net.sf.joodi.util.UnhandledException;
+
+/**
+ * @version $Id: DefaultNamespaceTest.java,v 1.1 2004/12/17 01:55:55 adammurdoch Exp $
+ */
+public class DefaultNamespaceTest extends TestCase {
+ public void testNamespaceHasUsefulStringRepresentation() {
+ assertEquals("Namespace a.b", new DefaultNamespace("a.b").toString());
+ }
+
+ public void testDefaultNamespaceHasUsefulStringRepresentation() {
+ assertEquals("Namespace <default>", new DefaultNamespace("").toString());
+ }
+
+ public void testNamespaceIsNotDescendentOfSelf() {
+ DefaultNamespace namespace = new DefaultNamespace("a.b.c");
+ assertFalse(namespace.isDescendent(namespace));
+ }
+
+ public void testParentNamespaceIsNotDescendent() {
+ Namespace namespace = new DefaultNamespace("a.b.c");
+ assertFalse(namespace.isDescendent(new DefaultNamespace("")));
+ assertFalse(namespace.isDescendent(new DefaultNamespace("a.b")));
+ assertFalse(namespace.isDescendent(new DefaultNamespace("a.b")));
+ }
+
+ public void testSiblingNamespaceIsNotDescendent() {
+ Namespace namespace = new DefaultNamespace("a.b.c");
+ assertFalse(namespace.isDescendent(new DefaultNamespace("a.b.c2")));
+ }
+
+ public void testChildNamespaceIsDescendent() {
+ Namespace namespace = new DefaultNamespace("a");
+ assertTrue(namespace.isDescendent(new DefaultNamespace("a.b")));
+ assertTrue(namespace.isDescendent(new DefaultNamespace("a.b.c")));
+ }
+
+ public void testAllOtherNamespacesAreDecendentsOfDefaultNamespace() {
+ Namespace namespace = new DefaultNamespace("");
+ assertTrue(namespace.isDescendent(new DefaultNamespace("a")));
+ assertTrue(namespace.isDescendent(new DefaultNamespace("b.c")));
+ }
+
+ public void testUsesNamespacesThatHaveNamespaceUseAdded() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+ DefaultNamespace otherNamespace = new DefaultNamespace("b");
+ assertNull(namespace.usesNamespace(otherNamespace));
+
+ DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, otherNamespace);
+ namespace.addNamespaceUse(namespaceUse);
+
+ assertSame(namespaceUse, namespace.usesNamespace(otherNamespace));
+ }
+
+ public void testDoesNotUseSelf() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+
+ namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, namespace));
+
+ assertNull(namespace.usesNamespace(namespace));
+ }
+
+ public void testCannotAddNamespaceUseThatIsNotFromThisNamespace() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+
+ try {
+ namespace.addNamespaceUse(Fixtures.P_USES_Q);
+ fail();
+ } catch (UnhandledException e) {
+ assertEquals("Using namespace must be this.", e.getMessage());
+ }
+ }
+
+ public void testDependsOnNamespaceThatIsDirectlyUsed() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+ DefaultNamespace otherNamespace = new DefaultNamespace("b");
+
+ assertNull(namespace.dependsOnNamespace(otherNamespace));
+
+ DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, otherNamespace);
+ namespace.addNamespaceUse(namespaceUse);
+
+ assertSame(namespaceUse, namespace.dependsOnNamespace(otherNamespace));
+ }
+
+ public void testDependsOnNamespaceThatIsTransitivelyUsed() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+
+ DefaultNamespace namespaceB = new DefaultNamespace("b");
+ DefaultNamespace namespaceC = new DefaultNamespace("c");
+
+ DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, namespaceB);
+ namespace.addNamespaceUse(namespaceUse);
+ DirectNamespaceUse otherUse = Fixtures.createDirectNamespaceUse(namespaceB, namespaceC);
+ namespaceB.addNamespaceUse(otherUse);
+
+ TransitiveNamespaceUse use = (TransitiveNamespaceUse) namespace.dependsOnNamespace(namespaceC);
+ assertNotNull(use);
+ assertSame(namespace, use.getNamespace());
+ assertSame(namespaceC, use.getOn());
+ }
+
+ public void testDependsOnSelfWhenThereIsACyclicUse() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+ DefaultNamespace other = new DefaultNamespace("b");
+
+ namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, other));
+ other.addNamespaceUse(Fixtures.createDirectNamespaceUse(other, namespace));
+
+ assertTrue(namespace.dependsOnNamespace(namespace) instanceof TransitiveNamespaceUse);
+ }
+
+ public void testGracefullyHandlesCyclesWhenTraversingDependencyGraph() {
+ DefaultNamespace namespace = new DefaultNamespace("a");
+
+ DefaultNamespace namespaceB = new DefaultNamespace("b");
+ DefaultNamespace namespaceC = new DefaultNamespace("c");
+
+ namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, namespaceB));
+ namespaceB.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespaceB, namespace));
+
+ assertNull(namespace.dependsOnNamespace(namespaceC));
+ }
+}
</pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>AbstractTypeTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- AbstractTypeTest.java 17 Dec 2004 00:55:18 -0000 1.3
+++ AbstractTypeTest.java 17 Dec 2004 01:55:54 -0000 1.4
@@ -31,7 +31,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Set;
/**
</pre><pre class="diff" id="removed">- * @version $Id: AbstractTypeTest.java,v 1.<span id="removedchars">3 2004/12/17 00:55:18</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: AbstractTypeTest.java,v 1.<span id="addedchars">4 2004/12/17 01:55:54</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class AbstractTypeTest extends TestCase {
</pre><pre class="diff"><small id="info">@@ -146,16 +146,16 @@
</small></pre><pre class="diff" id="context"> assertNull(type.dependsOnType(Fixtures.TYPE_A));
}
</pre><pre class="diff" id="removed">- private class DummyType extends AbstractType {
</pre><pre class="diff" id="added">+ private <span id="addedchars">static </span>class DummyType extends AbstractType {
</pre><pre class="diff" id="context"> public DummyType() {
</pre><pre class="diff" id="removed">- this("A", new Namespace("a"));
</pre><pre class="diff" id="added">+ this("A", new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context"> }
public DummyType(String name) {
</pre><pre class="diff" id="removed">- super(name, new Namespace("a"));
</pre><pre class="diff" id="added">+ super(name, new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- public DummyType(String name, Namespace namespace) {
</pre><pre class="diff" id="added">+ public DummyType(String name, <span id="addedchars">Default</span>Namespace namespace) {
</pre><pre class="diff" id="context"> super(name, namespace);
}
</pre><pre class="diff"><small id="info">@@ -169,11 +169,11 @@
</small></pre><pre class="diff" id="context">
}
</pre><pre class="diff" id="removed">- private class DummyTypeWithSuperClasses extends DummyType {
</pre><pre class="diff" id="added">+ private <span id="addedchars">static </span>class DummyTypeWithSuperClasses extends DummyType {
</pre><pre class="diff" id="context"> private final Set _superTypes = new HashSet();
public DummyTypeWithSuperClasses(String name) {
</pre><pre class="diff" id="removed">- super(name, new Namespace("a"));
</pre><pre class="diff" id="added">+ super(name, new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context"> }
public void addSuperType(DirectExtension extension) {
</pre><pre class="diff"><small id="info">@@ -185,11 +185,11 @@
</small></pre><pre class="diff" id="context"> }
}
</pre><pre class="diff" id="removed">- private class DummyTypeWithTypeUses extends DummyType {
</pre><pre class="diff" id="added">+ private <span id="addedchars">static </span>class DummyTypeWithTypeUses extends DummyType {
</pre><pre class="diff" id="context"> private final Set _typeUses = new HashSet();
public DummyTypeWithTypeUses(String name) {
</pre><pre class="diff" id="removed">- super(name, new Namespace("a"));
</pre><pre class="diff" id="added">+ super(name, new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context"> }
public Set getTypeUses() {
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>Fixtures.java</b></big> <small id="info">1.8 -> 1.9</small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- Fixtures.java 15 Dec 2004 23:08:20 -0000 1.8
+++ Fixtures.java 17 Dec 2004 01:55:55 -0000 1.9
@@ -28,13 +28,13 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: Fixtures.java,v 1.<span id="removedchars">8 2004/12/15 23:08:20</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: Fixtures.java,v 1.<span id="addedchars">9 2004/12/17 01:55:55</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public final class Fixtures {
</pre><pre class="diff" id="removed">- public static final Namespace NAMESPACE_P = new Namespace("namespaceP");
- public static final Namespace NAMESPACE_Q = new Namespace("namespaceQ");
- public static final Namespace NAMESPACE_R = new Namespace("namespaceR");
- public static final Namespace NAMESPACE_S = new Namespace("namespaceS");
</pre><pre class="diff" id="added">+ public static final DefaultNamespace NAMESPACE_P = new DefaultNamespace("namespaceP");
+ public static final DefaultNamespace NAMESPACE_Q = new DefaultNamespace("namespaceQ");
+ public static final DefaultNamespace NAMESPACE_R = new DefaultNamespace("namespaceR");
+ public static final DefaultNamespace NAMESPACE_S = new DefaultNamespace("namespaceS");
</pre><pre class="diff" id="context">
public static final Type TYPE_A = new SimpleType("typeA", NAMESPACE_P);
public static final Type TYPE_A1 = new SimpleType("typeA1", NAMESPACE_P);
</pre><pre class="diff"><small id="info">@@ -74,7 +74,7 @@
</small></pre><pre class="diff" id="context"> private Fixtures() {
}
</pre><pre class="diff" id="removed">- public static DirectNamespaceUse createDirectNamespaceUse(<span id="removedchars">Namespace a, </span>Namespace b) {
</pre><pre class="diff" id="added">+ public static DirectNamespaceUse createDirectNamespaceUse(<span id="addedchars">DefaultNamespace a, Default</span>Namespace b) {
</pre><pre class="diff" id="context"> return new DirectNamespaceUse(new DummyTypeUse(new SimpleType("A", a), new SimpleType("B", b)));
}
</pre><pre class="diff"><small id="info">@@ -83,7 +83,7 @@
</small></pre><pre class="diff" id="context"> }
public static SimpleType createType(String namespace, String name) {
</pre><pre class="diff" id="removed">- return new SimpleType(name, new Namespace(namespace));
</pre><pre class="diff" id="added">+ return new SimpleType(name, new <span id="addedchars">Default</span>Namespace(namespace));
</pre><pre class="diff" id="context"> }
public static ArrayType createArrayType(Type elementType) {
</pre></div>
<hr /><a name="file15" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>PrimitiveTypeTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- PrimitiveTypeTest.java 16 Dec 2004 05:43:45 -0000 1.3
+++ PrimitiveTypeTest.java 17 Dec 2004 01:55:55 -0000 1.4
@@ -27,16 +27,16 @@
</small></pre><pre class="diff" id="context"> import junit.framework.TestCase;
/**
</pre><pre class="diff" id="removed">- * @version $Id: PrimitiveTypeTest.java,v 1.<span id="removedchars">3 2004/12/16 05:43:4</span>5 adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: PrimitiveTypeTest.java,v 1.<span id="addedchars">4 2004/12/17 01:55:5</span>5 adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class PrimitiveTypeTest extends TestCase {
public void testDoesNotUseAnyType() {
</pre><pre class="diff" id="removed">- PrimitiveType type = new PrimitiveType("int", new Namespace(""));
</pre><pre class="diff" id="added">+ PrimitiveType type = new PrimitiveType("int", new <span id="addedchars">Default</span>Namespace(""));
</pre><pre class="diff" id="context"> assertTrue(type.getTypeUses().isEmpty());
}
public void testHasNoSuperTypes() {
</pre><pre class="diff" id="removed">- PrimitiveType type = new PrimitiveType("int", new Namespace(""));
</pre><pre class="diff" id="added">+ PrimitiveType type = new PrimitiveType("int", new <span id="addedchars">Default</span>Namespace(""));
</pre><pre class="diff" id="context"> assertTrue(type.getDirectSuperTypes().isEmpty());
}
}
</pre></div>
<hr /><a name="file16" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader"><big><b>SimpleTypeTest.java</b></big> <small id="info">1.7 -> 1.8</small></div>
<pre class="diff"><small id="info">diff -u -r1.7 -r1.8
--- SimpleTypeTest.java 17 Dec 2004 00:55:18 -0000 1.7
+++ SimpleTypeTest.java 17 Dec 2004 01:55:55 -0000 1.8
@@ -26,7 +26,7 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: SimpleTypeTest.java,v 1.<span id="removedchars">7 2004/12/17 00:55:18</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: SimpleTypeTest.java,v 1.<span id="addedchars">8 2004/12/17 01:55:55</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class SimpleTypeTest extends TestCase {
public void testIsAType() {
</pre><pre class="diff"><small id="info">@@ -34,7 +34,7 @@
</small></pre><pre class="diff" id="context"> }
public void testNotifiesNamespaceWhenATypeUseHasBeenAdded() {
</pre><pre class="diff" id="removed">- Namespace namespace = new Namespace("a");
</pre><pre class="diff" id="added">+ DefaultNamespace namespace = new DefaultNamespace("a");
</pre><pre class="diff" id="context">
SimpleType type = new SimpleType("A", namespace);
type.addTypeUse(new DummyTypeUse(type, Fixtures.TYPE_C));
</pre><pre class="diff"><small id="info">@@ -43,7 +43,7 @@
</small></pre><pre class="diff" id="context"> }
public void testUsesTypeWhenATypeUseHasBeenAdded() {
</pre><pre class="diff" id="removed">- SimpleType type = new SimpleType("A", new Namespace("a"));
</pre><pre class="diff" id="added">+ SimpleType type = new SimpleType("A", new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context">
assertNull(type.usesType(Fixtures.TYPE_C));
</pre><pre class="diff"><small id="info">@@ -54,7 +54,7 @@
</small></pre><pre class="diff" id="context"> }
public void testDoesNotUseSelf() {
</pre><pre class="diff" id="removed">- SimpleType type = new SimpleType("A", new Namespace("a"));
</pre><pre class="diff" id="added">+ SimpleType type = new SimpleType("A", new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context">
DummyTypeUse typeUse = new DummyTypeUse(type, type);
type.addTypeUse(typeUse);
</pre><pre class="diff"><small id="info">@@ -73,9 +73,9 @@
</small></pre><pre class="diff" id="context"> }
public void testAddsTypeUseForExtension() {
</pre><pre class="diff" id="removed">- SimpleType type = new SimpleType("A", new Namespace("a"));
</pre><pre class="diff" id="added">+ SimpleType type = new SimpleType("A", new <span id="addedchars">Default</span>Namespace("a"));
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- SimpleType superType = new SimpleType("B", new Namespace("b"));
</pre><pre class="diff" id="added">+ SimpleType superType = new SimpleType("B", new <span id="addedchars">Default</span>Namespace("b"));
</pre><pre class="diff" id="context"> type.addSuperType(superType);
assertTrue(type.usesType(superType) instanceof DirectExtension);
</pre></div>
<hr /><a name="file17" /><div class="file">
<span class="pathname" id="removed">joodi/src/test/net/sf/joodi/facts<br /></span>
<div class="fileheader" id="removed"><big><b>NamespaceTest.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N NamespaceTest.java
--- NamespaceTest.java 15 Dec 2004 02:32:31 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,151 +0,0 @@
</small></pre><pre class="diff" id="removed">-/**
- * JOODI - Java-based Object-Oriented Design Inferometer
- *
- * Copyright (c) 2003-04 RedHill Consulting, Pty. Ltd. All rights reserved.
- *
- * Redistributions in source code form must reproduce the above copyright and
- * this condition.
- *
- * The contents of this file are subject to the GNU General Public License,
- * Version 2 (the "License"); you may not use this file except in compliance
- * with the License. A copy of the License is available at
- * http://www.opensource.org/licenses/gpl-license.php.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL REDHILL CONSULTING OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.sf.joodi.facts;
-
-import junit.framework.TestCase;
-import net.sf.joodi.util.UnhandledException;
-
-/**
- * @version $Id: NamespaceTest.java,v 1.3 2004/12/15 02:32:31 adammurdoch Exp $
- */
-public class NamespaceTest extends TestCase {
- public void testNamespaceHasUsefulStringRepresentation() {
- assertEquals("Namespace a.b", new Namespace("a.b").toString());
- }
-
- public void testDefaultNamespaceHasUsefulStringRepresentation() {
- assertEquals("Namespace <default>", new Namespace("").toString());
- }
-
- public void testNamespaceIsNotDescendentOfSelf() {
- Namespace namespace = new Namespace("a.b.c");
- assertFalse(namespace.isDescendent(namespace));
- }
-
- public void testParentNamespaceIsNotDescendent() {
- Namespace namespace = new Namespace("a.b.c");
- assertFalse(namespace.isDescendent(new Namespace("")));
- assertFalse(namespace.isDescendent(new Namespace("a.b")));
- assertFalse(namespace.isDescendent(new Namespace("a.b")));
- }
-
- public void testSiblingNamespaceIsNotDescendent() {
- Namespace namespace = new Namespace("a.b.c");
- assertFalse(namespace.isDescendent(new Namespace("a.b.c2")));
- }
-
- public void testChildNamespaceIsDescendent() {
- Namespace namespace = new Namespace("a");
- assertTrue(namespace.isDescendent(new Namespace("a.b")));
- assertTrue(namespace.isDescendent(new Namespace("a.b.c")));
- }
-
- public void testAllOtherNamespacesAreDecendentsOfDefaultNamespace() {
- Namespace namespace = new Namespace("");
- assertTrue(namespace.isDescendent(new Namespace("a")));
- assertTrue(namespace.isDescendent(new Namespace("b.c")));
- }
-
- public void testUsesNamespacesThatHaveNamespaceUseAdded() {
- Namespace namespace = new Namespace("a");
- Namespace otherNamespace = new Namespace("b");
- assertNull(namespace.usesNamespace(otherNamespace));
-
- DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, otherNamespace);
- namespace.addNamespaceUse(namespaceUse);
-
- assertSame(namespaceUse, namespace.usesNamespace(otherNamespace));
- }
-
- public void testDoesNotUseSelf() {
- Namespace namespace = new Namespace("a");
-
- namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, namespace));
-
- assertNull(namespace.usesNamespace(namespace));
- }
-
- public void testCannotAddNamespaceUseThatIsNotFromThisNamespace() {
- Namespace namespace = new Namespace("a");
-
- try {
- namespace.addNamespaceUse(Fixtures.P_USES_Q);
- fail();
- } catch (UnhandledException e) {
- assertEquals("Using namespace must be this.", e.getMessage());
- }
- }
-
- public void testDependsOnNamespaceThatIsDirectlyUsed() {
- Namespace namespace = new Namespace("a");
- Namespace otherNamespace = new Namespace("b");
-
- assertNull(namespace.dependsOnNamespace(otherNamespace));
-
- DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, otherNamespace);
- namespace.addNamespaceUse(namespaceUse);
-
- assertSame(namespaceUse, namespace.dependsOnNamespace(otherNamespace));
- }
-
- public void testDependsOnNamespaceThatIsTransitivelyUsed() {
- Namespace namespace = new Namespace("a");
-
- Namespace namespaceB = new Namespace("b");
- Namespace namespaceC = new Namespace("c");
-
- DirectNamespaceUse namespaceUse = Fixtures.createDirectNamespaceUse(namespace, namespaceB);
- namespace.addNamespaceUse(namespaceUse);
- DirectNamespaceUse otherUse = Fixtures.createDirectNamespaceUse(namespaceB, namespaceC);
- namespaceB.addNamespaceUse(otherUse);
-
- TransitiveNamespaceUse use = (TransitiveNamespaceUse) namespace.dependsOnNamespace(namespaceC);
- assertNotNull(use);
- assertSame(namespace, use.getNamespace());
- assertSame(namespaceC, use.getOn());
- }
-
- public void testDependsOnSelfWhenThereIsACyclicUse() {
- Namespace namespace = new Namespace("a");
- Namespace other = new Namespace("b");
-
- namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, other));
- other.addNamespaceUse(Fixtures.createDirectNamespaceUse(other, namespace));
-
- assertTrue(namespace.dependsOnNamespace(namespace) instanceof TransitiveNamespaceUse);
- }
-
- public void testGracefullyHandlesCyclesWhenTraversingDependencyGraph() {
- Namespace namespace = new Namespace("a");
-
- Namespace namespaceB = new Namespace("b");
- Namespace namespaceC = new Namespace("c");
-
- namespace.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespace, namespaceB));
- namespaceB.addNamespaceUse(Fixtures.createDirectNamespaceUse(namespaceB, namespace));
-
- assertNull(namespace.dependsOnNamespace(namespaceC));
- }
-}
</pre></div>
<hr /><a name="file18" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/parser<br /></span>
<div class="fileheader"><big><b>NamespaceFactBuilderTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- NamespaceFactBuilderTest.java 15 Dec 2004 23:08:20 -0000 1.3
+++ NamespaceFactBuilderTest.java 17 Dec 2004 01:55:55 -0000 1.4
@@ -24,6 +24,7 @@
</small></pre><pre class="diff" id="context"> */
package net.sf.joodi.parser;
</pre><pre class="diff" id="added">+import net.sf.joodi.facts.DefaultNamespace;
</pre><pre class="diff" id="context"> import net.sf.joodi.facts.Namespace;
import net.sf.joodi.rules.AbstractRuleTestCase;
import net.sf.joodi.rules.RuleEngine;
</pre><pre class="diff"><small id="info">@@ -32,7 +33,7 @@
</small></pre><pre class="diff" id="context"> import java.util.Collections;
/**
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceFactBuilderTest.java,v 1.<span id="removedchars">3 2004/12/15 23:08:20</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceFactBuilderTest.java,v 1.<span id="addedchars">4 2004/12/17 01:55:55</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class NamespaceFactBuilderTest extends AbstractRuleTestCase {
private final MockControl _control = MockControl.createStrictControl(RuleEngineAndTypeLibrary.class);
</pre><pre class="diff"><small id="info">@@ -40,11 +41,11 @@
</small></pre><pre class="diff" id="context"> private final TypeLibrary _typeLibrary = (TypeLibrary) _control.getMock();
public void testAssertsAllNamespacesInTypeLibrary() {
</pre><pre class="diff" id="removed">- Namespace namespace = new Namespace("a.b");
</pre><pre class="diff" id="added">+ Namespace namespace = new <span id="addedchars">Default</span>Namespace("a.b");
</pre><pre class="diff" id="context">
_typeLibrary.getNamespaces();
_control.setReturnValue(Collections.singleton(namespace));
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> _ruleEngine.assertObject(namespace);
_control.replay();
</pre></div>
<hr /><a name="file19" /><div class="file">
<span class="pathname">joodi/src/test/net/sf/joodi/rules/drools<br /></span>
<div class="fileheader"><big><b>NamespaceUseRulesTest.java</b></big> <small id="info">1.3 -> 1.4</small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- NamespaceUseRulesTest.java 14 Dec 2004 06:14:28 -0000 1.3
+++ NamespaceUseRulesTest.java 17 Dec 2004 01:55:56 -0000 1.4
@@ -28,13 +28,13 @@
</small></pre><pre class="diff" id="context">
/**
* @author <a href="mailto:si...@re...">Simon Harris</a>
</pre><pre class="diff" id="removed">- * @version $Id: NamespaceUseRulesTest.java,v 1.<span id="removedchars">3 2004/12/14 06:14:28</span> adammurdoch Exp $
</pre><pre class="diff" id="added">+ * @version $Id: NamespaceUseRulesTest.java,v 1.<span id="addedchars">4 2004/12/17 01:55:56</span> adammurdoch Exp $
</pre><pre class="diff" id="context"> */
public class NamespaceUseRulesTest extends AbstractDroolsTestCase {
public void testCyclicDependenceCreatesNotification() {
</pre><pre class="diff" id="removed">- Namespace a = new Namespace("a");
- Namespace b = new Namespace("b");
</pre><pre class="diff" id="added">+ DefaultNamespace a = new DefaultNamespace("a");
+ DefaultNamespace b = new DefaultNamespace("b");
</pre><pre class="diff" id="context">
DirectNamespaceUse aUsesB = Fixtures.createDirectNamespaceUse(a, b);
a.addNamespaceUse(aUsesB);
</pre><pre class="diff"><small id="info">@@ -52,8 +52,8 @@
</small></pre><pre class="diff" id="context"> }
public void testNamespaceThatDirectlyDependsOnDescendentCreatesNotification() {
</pre><pre class="diff" id="removed">- Namespace parent = new Namespace("a");
- Namespace child = new Namespace("a.b");
</pre><pre class="diff" id="added">+ DefaultNamespace parent = new DefaultNamespace("a");
+ DefaultNamespace child = new DefaultNamespace("a.b");
</pre><pre class="diff" id="context">
DirectNamespaceUse use = Fixtures.createDirectNamespaceUse(parent, child);
parent.addNamespaceUse(use);
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.10</small></center>
</body></html>
|