User: rinkrank
Date: 02/02/24 16:02:51
Modified: src/xjavadoc XJavaDocTest.java XJavaDoc.java
SourceClass.java ClassDump.java
Log:
-Implemented (faulty) XJavaDocl.reset() FIXME please somebody who understands
threads ;-)
-Log4J/ConfigLog4J settings now have settings for all classes
-New proxy class test.
-Privatised XJavaDoc.scan(String) - getXClass(String) should always be used instead.
Revision Changes Path
1.15 +30 -2 xjavadoc/src/xjavadoc/XJavaDocTest.java
Index: XJavaDocTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/XJavaDocTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -r1.14 -r1.15
--- XJavaDocTest.java 24 Feb 2002 22:11:51 -0000 1.14
+++ XJavaDocTest.java 25 Feb 2002 00:02:51 -0000 1.15
@@ -76,6 +76,22 @@
/**
+ * The teardown method for JUnit
+ *
+ * @todo Uncomment the body. Reset should be done really, but it doesn't work
+ * properly.
+ * @exception Exception Describe the exception
+ * @todo-javadoc Write javadocs for exception
+ */
+ public void tearDown() throws Exception {
+ /*
+ * See @todo
+ * XJavaDoc.getInstance().reset();
+ */
+ }
+
+
+ /**
* A unit test for JUnit
*/
public void testReadHello() {
@@ -191,6 +207,18 @@
* @exception Exception Describe the exception
* @todo-javadoc Write javadocs for exception
*/
+ public void testProxyClass() throws Exception {
+ XClass clazz = XJavaDoc.getInstance().getXClass("Hello");
+ assert("The class should be a proxy class", clazz instanceof
ProxyClass);
+ }
+
+
+ /**
+ * A unit test for JUnit
+ *
+ * @exception Exception Describe the exception
+ * @todo-javadoc Write javadocs for exception
+ */
public void testAddCommentToCommentedClass() throws Exception {
XClass clazz = XJavaDoc.getInstance().updateClassTag("Hello", "here",
"is", "a tag for ya", 0);
File testDir = new File("build/junit/testAddCommentToCommentedClass");
@@ -201,8 +229,8 @@
/**
* A unit test for JUnit
*
- * @exception Exception Describe the exception @todo-javadoc Write javadocs for
- * exception
+ * @exception Exception Describe the exception
+ * @todo-javadoc Write javadocs for exception
*/
public void testInnerlass() throws Exception {
XClass clazz = XJavaDoc.getInstance().getXClass("Hello", true);
1.18 +144 -348 xjavadoc/src/xjavadoc/XJavaDoc.java
Index: XJavaDoc.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/XJavaDoc.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- XJavaDoc.java 24 Feb 2002 22:11:51 -0000 1.17
+++ XJavaDoc.java 25 Feb 2002 00:02:51 -0000 1.18
@@ -34,90 +34,72 @@
*
*/
package xjavadoc;
-
import java.io.File;
-
import java.io.FileNotFoundException;
-
import java.io.FileReader;
-
import java.io.Reader;
-
import java.io.Serializable;
-
import java.util.Arrays;
-
-import java.util.Collection;
-
+import java.util.List;
+import java.util.ArrayList;
import java.util.Collections;
-
import java.util.HashMap;
-
import java.util.HashSet;
-import java.util.Iterator;
-
-import java.util.List;
-
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created 3. januar 2002
*/
-
public class XJavaDoc implements XJavaDocRoot, Serializable {
/**
* @todo-javadoc Describe the field
*/
-
private final HashMap _sourceClasses = new HashMap();
/**
* @todo-javadoc Describe the field
*/
-
private final HashMap _binaryClasses = new HashMap();
/**
* @todo-javadoc Describe the field
*/
-
private final HashMap _unknownClasses = new HashMap();
/**
* @todo-javadoc Describe the field
*/
-
private final HashMap _proxyClasses = new HashMap();
/**
* @todo-javadoc Describe the field
*/
-
private final HashMap _packages = new HashMap();
/**
* @todo-javadoc Describe the field
*/
-
private File _dir;
/**
* @todo-javadoc Describe the field
*/
+ private final List _parseThreads = Collections.synchronizedList(new
ArrayList());
+ /**
+ * @todo-javadoc Describe the field
+ */
private String[] _files;
/**
* @todo-javadoc Describe the field
*/
-
private String _docletClass;
/**
* @todo-javadoc Describe the field
*/
-
public final static List PRIMITIVES =
Collections.unmodifiableList(Arrays.asList(new String[]
{"void", "byte", "short", "int", "long", "char", "float",
"double", "boolean"}
));
@@ -125,69 +107,53 @@
/**
* @todo-javadoc Describe the field
*/
-
private final static XJavaDoc instance = new XJavaDoc();
/**
* Get static reference to Log4J Logger
*/
-
private static org.apache.log4j.Category _log =
org.apache.log4j.Category.getInstance(XJavaDoc.class.getName());
/**
* @todo-javadoc Describe the field
*/
-
private static JavaParser _javaParser;
/**
* @todo-javadoc Describe the field
*/
-
private final static HashMap _primitiveClasses = new HashMap();
-
/**
* Describe what the XJavaDoc constructor does
*
* @todo-javadoc Write javadocs for constructor
*/
-
private XJavaDoc() {
-
}
-
/**
* Sets the Dir attribute of the XJavaDoc object
*
* @param dir The new Dir value
*/
-
public void setDir(File dir) {
-
this._dir = dir;
-
}
-
/**
* Sets the DocletClass attribute of the XJavaDoc object
*
* @param docletClass The new DocletClass value
*/
-
public void setDocletClass(String docletClass) {
-
this._docletClass = docletClass;
-
}
-
/**
* Sets the Files attribute of the XJavaDoc object
*
@@ -195,51 +161,141 @@
*/
public void setFiles(String[] files) {
-
this._files = files;
-
}
-
/**
* Gets the Dir attribute of the XJavaDoc object
*
* @return The Dir value
*/
-
public File getDir() {
-
return _dir;
}
-
/**
* Gets the DocletClass attribute of the XJavaDoc object
*
* @return The DocletClass value
*/
-
public String getDocletClass() {
-
return _docletClass;
}
-
/**
* Gets the Files attribute of the XJavaDoc object
*
* @return The Files value
*/
-
public String[] getFiles() {
-
return _files;
}
+ /**
+ * Get the XClass corresponding to the qualifiedName. This can be a class from
+ * source, a precompiled class or a primitive. UnknownClass is never returned
+ * from this method. If a class can't be resolved, null is returned. This
+ * method will return a proxy class if the class hasn't previouslu been loaded.
+ *
+ * @param qualifiedName Describe what the parameter does
+ * @return The XClass value
+ * @todo-javadoc Write javadocs for method parameter
+ * @pre qualifiedName != null
+ * @post return != null
+ */
+ public XClass getXClass(String qualifiedName) {
+ return getXClass(qualifiedName, true);
+ }
+
+
+ /**
+ * Get the XClass corresponding to the qualifiedName. This can be a class from
+ * source, a precompiled class or a primitive. UnknownClass is never returned
+ * from this method. If a class can't be resolved, null is returned.
+ *
+ * @param qualifiedName Describe what the parameter does
+ * @param proxy return a proxy instance (for performance) if the class hasn't
+ * been loaded before.
+ * @return The XClass value
+ * @todo-javadoc Write javadocs for method parameter
+ * @pre qualifiedName != null
+ * @post return != null
+ */
+ public XClass getXClass(String qualifiedName, boolean proxy) {
+ if (_dir == null) {
+ throw new IllegalStateException("setDir must pe called
first!");
+ }
+ if (qualifiedName.equals("")) {
+ throw new IllegalStateException("Classname can't be empty
String");
+ }
+ // first, see if we have the class among the sources
+ XClass result = (XClass)_sourceClasses.get(qualifiedName);
+ if (result == null) {
+ // Couldn't find the class among the sources. Try a Primitive
class.
+ result = getPrimitive(qualifiedName);
+ if (result == null) {
+ // Couldn't find the class among the sources and
wasn't primitive.
+ // Try a BinaryClass first
+ Class clazz = getClass(qualifiedName);
+ if (clazz != null) {
+ // there is a known binary class
+ if (proxy) {
+ // Just return a proxy. The proxy
+ // will ask for a non-proxy later
+ return getProxyClass(qualifiedName);
+ }
+ else {
+ return getBinaryClass(clazz);
+ }
+ }
+ else {
+ // No known binary either. Last resort is
+ // a source class
+ File f = new File(_dir,
qualifiedName.replace('.', '/') + ".java");
+ if (f.exists()) {
+ // The source exists. Let's parse it.
+ if (proxy) {
+ return
getProxyClass(qualifiedName);
+ }
+ else {
+ try {
+ return
scan(qualifiedName);
+ } catch (XJavaDocException e1)
{
+ throw new
IllegalStateException("Error during parse:" + e1.getMessage());
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+
+ /**
+ * Describe what the method does
+ *
+ * @todo-javadoc Write javadocs for method
+ */
+ public void reset() {
+ // interrupt all threads suspended by a wait.
+ for (int i = _parseThreads.size() - 1; i >= 0; i--) {
+ ParseThread parseThread = (ParseThread)_parseThreads.get(i);
+ parseThread.interrupt();
+ }
+ _sourceClasses.clear();
+ _binaryClasses.clear();
+ _proxyClasses.clear();
+ _unknownClasses.clear();
+ _packages.clear();
+ _parseThreads.clear();
+
+ }
+
/**
* Describe what the method does
@@ -265,7 +321,6 @@
* @todo-javadoc Write javadocs for return value
* @todo-javadoc Write javadocs for exception
*/
-
public XClass updateMethodTag(
String className,
String methodNameWithSignature,
@@ -274,20 +329,14 @@
String parameterValue,
int tagIndex
) throws XJavaDocException {
-
XClass clazz = getXClass(className, false);
-
XMethod method = clazz.getMethod(methodNameWithSignature);
-
XDoc doc = method.doc();
-
doc.updateTagValue(tagName, parameterName, parameterValue, tagIndex);
-
return clazz;
}
-
/**
* Describe what the method does
*
@@ -307,7 +356,6 @@
* @todo-javadoc Write javadocs for return value
* @todo-javadoc Write javadocs for exception
*/
-
public XClass updateClassTag(
String className,
String tagName,
@@ -315,120 +363,43 @@
String parameterValue,
int tagIndex
) throws XJavaDocException {
-
// Don't get proxy. It's only overhead
-
XClass clazz = getXClass(className, false);
-
XDoc doc = clazz.doc();
-
doc.updateTagValue(tagName, parameterName, parameterValue, tagIndex);
-
return clazz;
}
-
/**
* Describe what the method does
*
- * @param qualifiedName Describe what the parameter does
- * @return Describe the return value
* @exception XJavaDocException Describe the exception
* @todo-javadoc Write javadocs for method
- * @todo-javadoc Write javadocs for method parameter
- * @todo-javadoc Write javadocs for return value
* @todo-javadoc Write javadocs for exception
*/
-
- public XClass scan(String qualifiedName) throws XJavaDocException {
-
- File f = null;
-
- f = new File(_dir, qualifiedName.replace('.', '/') + ".java");
-
- if (!f.exists()) {
-
- throw new XJavaDocException("No source found for " +
qualifiedName + " at " + f.getAbsolutePath());
- }
-
- _log.debug("Scanning class: " + qualifiedName);
-
- SourceClass sourceClass = new SourceClass(null, qualifiedName, f);
-
- ParseThread parseThread = new ParseThread(sourceClass);
-
- // We must wait here until the first part of the parsing is done.
-
- // we'll be notified by the parser when it's done
-
- synchronized (sourceClass.getParseLock()) {
-
- parseThread.start();
-
- try {
-
- sourceClass.getParseLock().wait();
-
- } catch (InterruptedException e) {
-
- e.printStackTrace();
-
- }
-
- }
-
- return sourceClass;
- }
-
-
-
- /**
- * Describe what the method does
- *
- * @exception XJavaDocException Describe the exception
- * @todo-javadoc Write javadocs for method
- * @todo-javadoc Write javadocs for exception
- */
-
public void scan() throws XJavaDocException {
-
+ if (_dir == null) {
+ throw new XJavaDocException("setDir must pe called first!");
+ }
long start = System.currentTimeMillis();
-
System.out.println("Scanning " + _files.length + " classes...");
-
for (int i = 0; i < _files.length; i++) {
-
String qualifiedName = _files[i].replace('/', '.');
-
qualifiedName = qualifiedName.replace('\\', '.');
-
qualifiedName = qualifiedName.substring(0,
qualifiedName.length() - 5);
-
XClass clazz = scan(qualifiedName);
-
_sourceClasses.put(qualifiedName, clazz);
-
}
-
long end = System.currentTimeMillis();
-
System.out.println("Scanned " + _sourceClasses.size() + " classes in "
+ (end - start) + " milliseconds.");
-
printMemoryStatus();
-
if (_docletClass != null) {
-
- _log.debug("Running doclet " + _docletClass);
-
invokeDoclet();
-
}
-
}
-
/**
* Describe what the method does
*
@@ -436,42 +407,28 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
-
public XClass[] classes() {
-
XClass[] result = new XClass[_sourceClasses.size()];
-
return (XClass[])_sourceClasses.values().toArray(result);
}
-
/**
* Returns the packages of the specified classes during parsing.
*
* @return Describe the return value
* @todo-javadoc Write javadocs for return value
*/
-
public XPackage[] specifiedPackages() {
-
HashSet packages = new HashSet();
-
XClass[] classes = classes();
-
for (int i = 0; i < classes.length; i++) {
-
packages.add(classes[i].containingPackage());
-
}
-
XPackage[] result = new XPackage[packages.size()];
-
result = (XPackage[])packages.toArray(result);
-
return result;
// We don't want to return all packages
-
/*
* XPackage[] result = new XPackage[ _packages.size() ];
* return (XPackage[]) _packages.values().toArray( result );
@@ -479,7 +436,6 @@
}
-
/**
* Describe what the method does
*
@@ -489,140 +445,27 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
-
public XPackage packageNamed(String s) {
-
return (XPackage)_packages.get(s);
}
-
- /**
- * Get the XClass corresponding to the qualifiedName. This can be a class from
- * source, a precompiled class or a primitive. UnknownClass is never returned
- * from this method. If a class can't be resolved, null is returned.
- *
- * @param qualifiedName Describe what the parameter does
- * @param proxy return a proxy instance (for performance) if the class hasn't
- * been loaded before.
- * @return The XClass value
- * @todo-javadoc Write javadocs for method parameter
- * @pre qualifiedName != null
- * @post return != null
- */
-
- XClass getXClass(String qualifiedName, boolean proxy) {
-
- if (qualifiedName.equals("")) {
-
- throw new IllegalStateException("Classname can't be empty
String");
- }
-
- // first, see if we have the class among the sources
-
- XClass result = (XClass)_sourceClasses.get(qualifiedName);
-
- if (result == null) {
-
- // Couldn't find the class among the sources. Try a Primitive
class.
-
- result = getPrimitive(qualifiedName);
-
- if (result == null) {
-
- // Couldn't find the class among the sources and
wasn't primitive.
-
- // Try a BinaryClass first
-
- Class clazz = getClass(qualifiedName);
-
- if (clazz != null) {
-
- // there is a known binary class
-
- if (proxy) {
-
- // Just return a proxy. The proxy
-
- // will ask for a non-proxy later
-
- return getProxyClass(qualifiedName);
- }
-
- else {
-
- return getBinaryClass(clazz);
- }
-
- }
-
- else {
-
- // No known binary either. Last resort is
-
- // a source class
-
- File f = new File(_dir,
qualifiedName.replace('.', '/') + ".java");
-
- if (f.exists()) {
-
- // The source exists. Let's parse it.
-
- if (proxy) {
-
- return
getProxyClass(qualifiedName);
- }
-
- else {
-
- try {
-
- return
scan(qualifiedName);
- } catch (XJavaDocException e1)
{
-
- throw new
IllegalStateException("Error during parse:" + e1.getMessage());
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- return result;
- }
-
-
-
/**
* @param qualifiedName Describe what the parameter does
* @return The UnknownClass value
* @todo-javadoc Write javadocs for method parameter
*/
-
UnknownClass getUnknownClass(String qualifiedName) {
-
UnknownClass result = (UnknownClass)_unknownClasses.get(qualifiedName);
-
if (result == null) {
-
// Couldn't find the UnknownClass class in the cache.
Instantiate it.
-
result = new UnknownClass(qualifiedName);
-
_unknownClasses.put(qualifiedName, result);
-
}
-
return result;
}
-
/**
* Describe the method
*
@@ -632,26 +475,17 @@
* @todo-javadoc Describe the method parameter
* @todo-javadoc Write javadocs for return value
*/
-
XPackage addPackageMaybe(String packageName) {
-
XPackage result = (XPackage)_packages.get(packageName);
-
if (result == null) {
-
// The package doesn't exist yet. Add it then
-
result = new XPackage(packageName);
-
_packages.put(packageName, result);
-
}
-
return result;
}
-
/**
* Gets the ProxyClass attribute of the XJavaDoc object
*
@@ -659,29 +493,19 @@
* @return The ProxyClass value
* @todo-javadoc Write javadocs for method parameter
*/
-
private ProxyClass getProxyClass(String qualifiedName) {
-
if (qualifiedName.equals("")) {
-
throw new IllegalStateException("Classname can't be empty
String");
}
-
ProxyClass result = (ProxyClass)_proxyClasses.get(qualifiedName);
-
if (result == null) {
-
result = new ProxyClass(qualifiedName);
-
_proxyClasses.put(qualifiedName, result);
-
}
-
return result;
}
-
/**
* Returns the Class with the given name, or null if unknown.
*
@@ -690,21 +514,15 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
-
private Class getClass(String qualifiedName) {
-
try {
-
return Class.forName(qualifiedName);
} catch (ClassNotFoundException e) {
-
return null;
}
-
}
-
/**
* Gets the BinaryClass attribute of the XJavaDoc object
*
@@ -714,46 +532,64 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for exception
*/
-
private BinaryClass getBinaryClass(Class clazz) {
-
BinaryClass result = (BinaryClass)_binaryClasses.get(clazz);
-
if (result == null) {
-
// Couldn't find the binary class in the cache. Try to
instantiate it.
-
result = new BinaryClass(clazz);
-
_binaryClasses.put(clazz, result);
-
}
-
return result;
}
-
/**
* Describe what the method does
*
+ * @param qualifiedName Describe what the parameter does
+ * @return Describe the return value
+ * @exception XJavaDocException Describe the exception
* @todo-javadoc Write javadocs for method
+ * @todo-javadoc Write javadocs for method parameter
+ * @todo-javadoc Write javadocs for return value
+ * @todo-javadoc Write javadocs for exception
*/
+ private XClass scan(String qualifiedName) throws XJavaDocException {
+ File f = null;
+ f = new File(_dir, qualifiedName.replace('.', '/') + ".java");
+ if (!f.exists()) {
+ throw new XJavaDocException("No source found for " +
qualifiedName + " at " + f.getAbsolutePath());
+ }
+ SourceClass sourceClass = new SourceClass(null, qualifiedName, f);
+ ParseThread parseThread = new ParseThread(sourceClass);
+ _parseThreads.add(parseThread);
+ // We must wait here until the first part of the parsing is done.
+ // we'll be notified by the parser when it's done
+ synchronized (sourceClass.getParseLock()) {
+ parseThread.start();
+ try {
+ sourceClass.getParseLock().wait();
+ } catch (InterruptedException e) {
+ _log.debug("The scanning of " + qualifiedName + " has
been interrupted");
+ }
+ }
+ return sourceClass;
+ }
- private void printMemoryStatus() {
+ /**
+ * Describe what the method does
+ *
+ * @todo-javadoc Write javadocs for method
+ */
+ private void printMemoryStatus() {
System.out.println("ParameterImpl instances: " +
ParameterImpl.instanceCount);
-
System.out.println("MethodImpl instances: " +
MethodImpl.instanceCount);
-
System.out.println("ConstructorImpl instances: " +
ConstructorImpl.instanceCount);
-
System.out.println("SimpleNode instances: " +
SimpleNode.instanceCount);
-
}
-
/**
* Describe what the method does
*
@@ -761,41 +597,28 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for exception
*/
-
private void invokeDoclet() throws XJavaDocException {
-
try {
-
Object o = Class.forName(_docletClass).newInstance();
-
XJavaDoclet doclet = (XJavaDoclet)o;
-
doclet.start(this);
-
} catch (Exception e) {
-
e.printStackTrace();
-
throw new XJavaDocException(e);
}
-
}
-
/**
* Gets the Instance attribute of the XJavaDoc class
*
* @return The Instance value
*/
-
public static XJavaDoc getInstance() {
-
return instance;
}
-
/**
* Gets the Primitive attribute of the XJavaDoc class
*
@@ -803,14 +626,11 @@
* @return The Primitive value
* @todo-javadoc Write javadocs for method parameter
*/
-
private static Primitive getPrimitive(String name) {
-
return (Primitive)_primitiveClasses.get(name);
}
-
/**
* Describe the method
*
@@ -818,15 +638,11 @@
* @todo-javadoc Describe the method
* @todo-javadoc Describe the method parameter
*/
-
private final static void addPrimitive(String name) {
-
_primitiveClasses.put(name, new Primitive(name));
-
}
-
/**
* Describe what this class does
*
@@ -834,17 +650,13 @@
* @created 23. februar 2002
* @todo-javadoc Write javadocs
*/
-
private class ParseThread extends Thread {
-
/**
* @todo-javadoc Describe the field
*/
-
private final SourceClass _sourceClass;
-
/**
* Describe what the ParseThread constructor does
*
@@ -852,40 +664,24 @@
* @todo-javadoc Write javadocs for constructor
* @todo-javadoc Write javadocs for method parameter
*/
-
public ParseThread(SourceClass sourceClass) {
-
super(sourceClass.qualifiedName());
-
setDaemon(true);
-
_sourceClass = sourceClass;
-
}
-
/**
* Main processing method for the ParseThread object
*/
-
public void run() {
-
_sourceClass.parse();
-
+ _parseThreads.remove(this);
}
-
}
-
static {
-
for (int i = 0; i < PRIMITIVES.size(); i++) {
-
addPrimitive((String)PRIMITIVES.get(i));
-
}
-
}
-
}
-
1.10 +1 -1 xjavadoc/src/xjavadoc/SourceClass.java
Index: SourceClass.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/SourceClass.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- SourceClass.java 24 Feb 2002 22:11:51 -0000 1.9
+++ SourceClass.java 25 Feb 2002 00:02:51 -0000 1.10
@@ -262,7 +262,7 @@
try {
getParseLock().wait();
} catch (InterruptedException e) {
- e.printStackTrace();
+ _log.debug("The complete() of " +
qualifiedName() + " has been interrupted");
}
}
_isParseCompleted = true;
1.10 +4 -4 xjavadoc/src/xjavadoc/ClassDump.java
Index: ClassDump.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/ClassDump.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- ClassDump.java 24 Feb 2002 20:33:50 -0000 1.9
+++ ClassDump.java 25 Feb 2002 00:02:51 -0000 1.10
@@ -44,7 +44,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created Feb 2, 2002
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class ClassDump extends Task {
@@ -112,10 +112,10 @@
XJavaDoc.getInstance().setFiles(new
String[]{className.replace('.', File.separatorChar) + ".java"});
XJavaDoc.getInstance().setDocletClass(null);
- XClass clazz = XJavaDoc.getInstance().scan(className);
+ XClass clazz = XJavaDoc.getInstance().getXClass(className);
dumpClass(clazz);
- } catch (XJavaDocException e) {
- e.printStackTrace();
+ } catch (NullPointerException e) {
+ throw new BuildException("Couldn't find class " + className);
}
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel