User: rinkrank
Date: 02/02/24 17:03:10
Modified: src/xjavadoc XJavaDocTest.java XJavaDoc.java
AbstractClass.java
Log:
-Fixed bug in clearing the _nameBuffer StringBuffer
-added implementsInterface test
-fixed NPE for dir when running from Ant (because deserialised was not same as
singleton)
Now XDoclet GUI is up again ;-)
Revision Changes Path
1.16 +12 -0 xjavadoc/src/xjavadoc/XJavaDocTest.java
Index: XJavaDocTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/XJavaDocTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -r1.15 -r1.16
--- XJavaDocTest.java 25 Feb 2002 00:02:51 -0000 1.15
+++ XJavaDocTest.java 25 Feb 2002 01:03:10 -0000 1.16
@@ -246,6 +246,18 @@
* @exception Exception Describe the exception
* @todo-javadoc Write javadocs for exception
*/
+ public void testImplements() throws Exception {
+ XClass clazz = XJavaDoc.getInstance().getXClass("Hello", true);
+ assert("Hello is Serializable",
clazz.implementsInterface("java.io.Serializable"));
+ }
+
+
+ /**
+ * A unit test for JUnit
+ *
+ * @exception Exception Describe the exception
+ * @todo-javadoc Write javadocs for exception
+ */
public void testAddCommentToUncommentedMethod() throws Exception {
XClass clazz;
clazz = XJavaDoc.getInstance().updateMethodTag(
1.19 +15 -1 xjavadoc/src/xjavadoc/XJavaDoc.java
Index: XJavaDoc.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/XJavaDoc.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -r1.18 -r1.19
--- XJavaDoc.java 25 Feb 2002 00:02:51 -0000 1.18
+++ XJavaDoc.java 25 Feb 2002 01:03:10 -0000 1.19
@@ -107,7 +107,7 @@
/**
* @todo-javadoc Describe the field
*/
- private final static XJavaDoc instance = new XJavaDoc();
+ private static XJavaDoc instance = new XJavaDoc();
/**
* Get static reference to Log4J Logger
@@ -140,6 +140,8 @@
* @param dir The new Dir value
*/
public void setDir(File dir) {
+ System.out.println("setFile " + dir.getAbsolutePath());
+ _log.debug("setFile " + dir.getAbsolutePath());
this._dir = dir;
}
@@ -606,6 +608,18 @@
e.printStackTrace();
throw new XJavaDocException(e);
}
+ }
+
+
+ /**
+ * Copies settings from an other instance. Useful if an instance was
+ * deserialized. The only reason to serialise is to augment the memory size.
+ * This will only be done from the Ant task.
+ *
+ * @param other The new Singleton value
+ */
+ public static synchronized void setSingleton(XJavaDoc other) {
+ instance = other;
}
1.9 +2 -1 xjavadoc/src/xjavadoc/AbstractClass.java
Index: AbstractClass.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/AbstractClass.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- AbstractClass.java 24 Feb 2002 22:11:51 -0000 1.8
+++ AbstractClass.java 25 Feb 2002 01:03:10 -0000 1.9
@@ -630,10 +630,11 @@
* @todo-javadoc Write javadocs for return value
*/
public final boolean implementsInterface(String interfaceName) {
+ System.out.println(qualifiedName() + " implements " + interfaceName +
" ?");
boolean result = false;
XClass[] interfaces = interfaces();
for (int i = interfaces.length - 1; i >= 0; i--) {
- _log.debug(qualifiedName() + " IMPLEMENTS " +
interfaces[i].qualifiedName());
+ System.out.println(qualifiedName() + " IMPLEMENTS " +
interfaces[i].qualifiedName());
if (interfaces[i].qualifiedName().equals(interfaceName)) {
result = true;
break;
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel