User: ko5tik
Date: 02/04/17 00:32:42
Modified: src/xjavadoc AbstractProgramElement.java ProxyClass.java
Log:
fixed broken build on updateDoc()
Revision Changes Path
1.12 +402 -409 xjavadoc/src/xjavadoc/AbstractProgramElement.java
Index: AbstractProgramElement.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/AbstractProgramElement.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -r1.11 -r1.12
--- AbstractProgramElement.java 16 Apr 2002 14:42:38 -0000 1.11
+++ AbstractProgramElement.java 17 Apr 2002 07:32:41 -0000 1.12
@@ -1,37 +1,6 @@
/*
- * Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
+ * Copyright (c) 2001,2002 The XDoclet team
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of BEKK Consulting nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS 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 THE REGENTS OR 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.
- */
-
-/*
- * Change log
- *
*/
package xjavadoc;
@@ -45,7 +14,13 @@
* @created February 17, 2002
* @todo-javadoc Write javadocs
*/
-abstract class AbstractProgramElement extends LogAdapter implements XProgramElement
{
+abstract class AbstractProgramElement extends LogAdapter implements XProgramElement
+{
+
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private final XDoc NULL_XDOC = new XDoc( null, this );
/**
* @todo-javadoc Describe the field
@@ -87,12 +62,6 @@
private Token _javadocToken;
/**
- * @todo-javadoc Describe the field
- */
- private final XDoc NULL_XDOC = new XDoc(null, this);
-
-
- /**
* Describe what the AbstractProgramElement constructor does
*
* @param containingClass Describe what the parameter does
@@ -101,132 +70,119 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
- protected AbstractProgramElement(XClass containingClass, String qualifiedName)
{
+ protected AbstractProgramElement( XClass containingClass, String qualifiedName
)
+ {
_containingClass = containingClass;
_qualifiedName = qualifiedName;
}
-
- /**
- * Sets the Token where we start. Useful for doc mutation.
- *
- * @param token The new Token value
- */
- public final void setToken(Token token) {
- if (_token == null && token != null) {
- _token = token;
- setJavaDoc();
- }
- }
-
-
- /**
- * Sets the Name attribute of the SourceExecutableMember object
- *
- * @param name The new Name value
- */
- public void setName(String name) {
- _name = name;
- }
-
-
- /**
- * Sets the QualifiedName attribute of the AbstractProgramElement object
- *
- * @param qualifiedName The new QualifiedName value
- */
- public void setQualifiedName(String qualifiedName) {
- if (_qualifiedName != null) {
- throw new IllegalStateException("Setting qualified name 2nd
time!");
- }
- _qualifiedName = qualifiedName;
- }
-
-
/**
* Gets the Final attribute of the AbstractProgramElement object
*
* @return The Final value
*/
- public final boolean isFinal() {
+ public final boolean isFinal()
+ {
return (_modifiers & Modifier.FINAL) != 0;
}
-
/**
* Gets the Abstract attribute of the AbstractProgramElement object
*
* @return The Abstract value
*/
- public final boolean isAbstract() {
+ public final boolean isAbstract()
+ {
return (_modifiers & Modifier.ABSTRACT) != 0;
}
-
/**
* Gets the PackagePrivate attribute of the AbstractProgramElement object
*
* @return The PackagePrivate value
*/
- public final boolean isPackagePrivate() {
+ public final boolean isPackagePrivate()
+ {
return !isPrivate() && !isProtected() && !isPublic();
}
-
/**
* Gets the Private attribute of the AbstractProgramElement object
*
* @return The Private value
*/
- public final boolean isPrivate() {
+ public final boolean isPrivate()
+ {
return (_modifiers & Modifier.PRIVATE) != 0;
}
-
/**
* Gets the Protected attribute of the AbstractProgramElement object
*
* @return The Protected value
*/
- public final boolean isProtected() {
+ public final boolean isProtected()
+ {
return (_modifiers & Modifier.PROTECTED) != 0;
}
-
/**
* Gets the Public attribute of the AbstractProgramElement object
*
* @return The Public value
*/
- public final boolean isPublic() {
+ public final boolean isPublic()
+ {
return (_modifiers & Modifier.PUBLIC) != 0;
}
-
/**
* Gets the Static attribute of the AbstractProgramElement object
*
* @return The Static value
*/
- public final boolean isStatic() {
+ public final boolean isStatic()
+ {
return (_modifiers & Modifier.STATIC) != 0;
}
+ /**
+ * Sets the Token where we start. Useful for doc mutation.
+ *
+ * @param token The new Token value
+ */
+ public final void setToken( Token token )
+ {
+ if( _token == null && token != null )
+ {
+ _token = token;
+ setJavaDoc();
+ }
+ }
/**
- * Describe what the method does
+ * Sets the Name attribute of the SourceExecutableMember object
*
- * @param o Describe what the parameter does
- * @return Describe the return value
- * @todo-javadoc Write javadocs for method
- * @todo-javadoc Write javadocs for method parameter
- * @todo-javadoc Write javadocs for return value
+ * @param name The new Name value
*/
- public int compareTo(Object o) {
- XProgramElement other = (XProgramElement)o;
- return qualifiedName().compareTo(other.qualifiedName());
+ public void setName( String name )
+ {
+ _name = name;
}
+ /**
+ * Sets the QualifiedName attribute of the AbstractProgramElement object
+ *
+ * @param qualifiedName The new QualifiedName value
+ */
+ public void setQualifiedName( String qualifiedName )
+ {
+ if( _qualifiedName != null )
+ {
+ throw new IllegalStateException( "Setting qualified name 2nd
time!" );
+ }
+ _qualifiedName = qualifiedName;
+ }
/**
* Describe what the setModifiers constructor does
@@ -236,11 +192,11 @@
* @todo-javadoc Write javadocs for constructor
* @todo-javadoc Write javadocs for method parameter
*/
- public final void addModifier(int modifier) {
+ public final void addModifier( int modifier )
+ {
_modifiers |= modifier;
}
-
/**
* Describe what the method does
*
@@ -248,11 +204,11 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public final String name() {
+ public final String name()
+ {
return _name;
}
-
/**
* Describe what the method does
*
@@ -260,38 +216,46 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public final String qualifiedName() {
+ public final String qualifiedName()
+ {
return _qualifiedName;
}
-
/**
* Get the doc
*
- * @todo handle package private classes
* @return the class level doc
+ * @todo handle package private classes
*/
- public final XDoc doc() {
- if (_doc == null) {
- if (_token == null) {
+ public final XDoc doc()
+ {
+ if( _doc == null )
+ {
+ if( _token == null )
+ {
// We're not from source (we're binary, primitive or
unknown)
_doc = NULL_XDOC;
}
- else {
- if (_javadocToken != null) {
+ else
+ {
+ if( _javadocToken != null )
+ {
_doc = new XDoc(_javadocToken, this);
}
- else {
+ else
+ {
// there was no doc in the original source.
Create it.
// We have to create a new token and attach it
to _token as specialToken
// The pre and post tokens are only to ensure
proper line breaks before and after
Token preJavadocToken =
Token.newToken(NodeParserConstants.DEFAULT);
+
preJavadocToken.image = "\n\n";
_javadocToken =
Token.newToken(NodeParserConstants.FORMAL_COMMENT);
_javadocToken.image = "";
Token postJavadocToken =
Token.newToken(NodeParserConstants.DEFAULT);
+
postJavadocToken.image = "\n";
// Link the new tokens properly
@@ -306,31 +270,47 @@
return _doc;
}
-
/**
* Get modifiers string.
*
* @return Describe the return value
* @todo-javadoc Write javadocs for return value
*/
- public final String modifiers() {
- if (modifiers == null) {
+ public final String modifiers()
+ {
+ if( modifiers == null )
+ {
modifiers = Modifier.toString(_modifiers);
}
return modifiers;
}
-
/**
* Get the modifier specifier integer.
*
* @return Describe the return value
* @todo-javadoc Write javadocs for return value
*/
- public final int modifierSpecifier() {
+ public final int modifierSpecifier()
+ {
return _modifiers;
}
+ /**
+ * Describe what the method does
+ *
+ * @param o Describe what the parameter does
+ * @return Describe the return value
+ * @todo-javadoc Write javadocs for method
+ * @todo-javadoc Write javadocs for method parameter
+ * @todo-javadoc Write javadocs for return value
+ */
+ public int compareTo( Object o )
+ {
+ XProgramElement other = ( XProgramElement ) o;
+
+ return qualifiedName().compareTo( other.qualifiedName() );
+ }
/**
* Describe what the method does
@@ -339,11 +319,11 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass containingClass() {
+ public XClass containingClass()
+ {
return _containingClass;
}
-
/**
* Describe what the method does
*
@@ -351,43 +331,53 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XPackage containingPackage() {
- if (_containingClass != null) {
+ public XPackage containingPackage()
+ {
+ if( _containingClass != null )
+ {
return containingClass().containingPackage();
}
- else {
+ else
+ {
return null;
}
}
-
/**
* update javadoc
*/
- void updateDoc() {
- if (_doc != null) {
+ public void updateDoc()
+ {
+ if( _doc != null )
+ {
_doc.updateToken();
}
}
-
/**
* Sets the JavaDoc attribute of the AbstractProgramElement object
*/
- private final void setJavaDoc() {
+ private final void setJavaDoc()
+ {
Token javadoc = null;
Token tt = _token.specialToken;
- if (tt != null) {
- while (tt.specialToken != null) {
+
+ if( tt != null )
+ {
+ while( tt.specialToken != null )
+ {
tt = tt.specialToken;
}
- while (tt != null) {
- if (tt.kind == NodeParserConstants.FORMAL_COMMENT) {
+ while( tt != null )
+ {
+ if( tt.kind == NodeParserConstants.FORMAL_COMMENT )
+ {
// it's JavaDoc
javadoc = tt;
}
- else if (tt.kind ==
NodeParserConstants.SINGLE_LINE_COMMENT || tt.kind ==
NodeParserConstants.MULTI_LINE_COMMENT) {
+ else if( tt.kind ==
NodeParserConstants.SINGLE_LINE_COMMENT || tt.kind ==
NodeParserConstants.MULTI_LINE_COMMENT )
+ {
// reset it. some other comment is standalone
or followed what could have been a javadoc comment
//_log.debug("Not javadoc anyway:" + tt.image);
javadoc = null;
@@ -395,12 +385,15 @@
tt = tt.next;
}
}
- if (javadoc != null) {
+ if( javadoc != null )
+ {
// There was javadoc here!
- if (_doc != null) {
+ if( _doc != null )
+ {
throw new IllegalStateException("Doc has already been
set!!");
}
- else {
+ else
+ {
_javadocToken = javadoc;
}
}
1.18 +254 -265 xjavadoc/src/xjavadoc/ProxyClass.java
Index: ProxyClass.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/ProxyClass.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- ProxyClass.java 4 Apr 2002 10:59:52 -0000 1.17
+++ ProxyClass.java 17 Apr 2002 07:32:42 -0000 1.18
@@ -1,37 +1,6 @@
/*
- * Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
+ * Copyright (c) 2001,2002 The XDoclet team
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of BEKK Consulting nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS 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 THE REGENTS OR 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.
- */
-
-/*
- * Change log
- *
*/
package xjavadoc;
@@ -48,27 +17,27 @@
* @created February 17, 2002
* @todo-javadoc Write javadocs
*/
-final class ProxyClass implements XClass {
+final class ProxyClass implements XClass
+{
/**
* @todo-javadoc Describe the field
*/
- private String _qualifiedName;
+ public static int instanceCount = 0;
+
/**
* @todo-javadoc Describe the field
*/
- private XClass _subject = null;
+ private final boolean _useNodeParser;
/**
* @todo-javadoc Describe the field
*/
- private final boolean _useNodeParser;
-
+ private String _qualifiedName;
/**
* @todo-javadoc Describe the field
*/
- public static int instanceCount = 0;
-
+ private XClass _subject = null;
/**
* Describe what the BinaryClass constructor does
@@ -82,92 +51,94 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
- public ProxyClass(String qualifiedName, boolean useNodeParser) {
+ public ProxyClass( String qualifiedName, boolean useNodeParser )
+ {
_qualifiedName = qualifiedName;
_useNodeParser = useNodeParser;
+
String packageName = AbstractClass.packageNameFor(qualifiedName);
+
XJavaDoc.getInstance().addPackageMaybe(packageName).addClass(this);
instanceCount++;
}
-
/**
* Gets the Writeable attribute of the ProxyClass object
*
* @return The Writeable value
*/
- public boolean isWriteable() {
+ public boolean isWriteable()
+ {
resolve();
return _subject.isWriteable();
}
-
/**
* Gets the Final attribute of the ProxyClass object
*
* @return The Final value
*/
- public boolean isFinal() {
+ public boolean isFinal()
+ {
resolve();
return _subject.isFinal();
}
-
/**
* Gets the PackagePrivate attribute of the ProxyClass object
*
* @return The PackagePrivate value
*/
- public boolean isPackagePrivate() {
+ public boolean isPackagePrivate()
+ {
resolve();
return _subject.isPackagePrivate();
}
-
/**
* Gets the Private attribute of the ProxyClass object
*
* @return The Private value
*/
- public boolean isPrivate() {
+ public boolean isPrivate()
+ {
resolve();
return _subject.isPrivate();
}
-
/**
* Gets the Protected attribute of the ProxyClass object
*
* @return The Protected value
*/
- public boolean isProtected() {
+ public boolean isProtected()
+ {
resolve();
return _subject.isProtected();
}
-
/**
* Gets the Public attribute of the ProxyClass object
*
* @return The Public value
*/
- public boolean isPublic() {
+ public boolean isPublic()
+ {
resolve();
return _subject.isPublic();
}
-
/**
* Gets the Static attribute of the ProxyClass object
*
* @return The Static value
*/
- public boolean isStatic() {
+ public boolean isStatic()
+ {
resolve();
return _subject.isStatic();
}
-
/**
* Gets the Method attribute of the ProxyClass object
*
@@ -176,12 +147,12 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
- public XMethod getMethod(String method) {
+ public XMethod getMethod( String method )
+ {
resolve();
return _subject.getMethod(method);
}
-
/**
* Gets the Constructor attribute of the ProxyClass object
*
@@ -189,12 +160,12 @@
* @return The Constructor value
* @todo-javadoc Write javadocs for method parameter
*/
- public XConstructor getConstructor(String constructor) {
+ public XConstructor getConstructor( String constructor )
+ {
resolve();
return _subject.getConstructor(constructor);
}
-
/**
* Gets the Method attribute of the ProxyClass object
*
@@ -202,23 +173,23 @@
* @return The Method value
* @todo-javadoc Write javadocs for method parameter
*/
- public XField getField(String name) {
+ public XField getField( String name )
+ {
resolve();
return _subject.getField(name);
}
-
/**
* Gets the Abstract attribute of the ProxyClass object
*
* @return The Abstract value
*/
- public boolean isAbstract() {
+ public boolean isAbstract()
+ {
resolve();
return _subject.isAbstract();
}
-
/**
* Gets the A attribute of the ProxyClass object
*
@@ -226,11 +197,20 @@
* @return The A value
* @todo-javadoc Write javadocs for method parameter
*/
- public boolean isA(String classOrInterfaceName) {
+ public boolean isA( String classOrInterfaceName )
+ {
resolve();
return _subject.isA(classOrInterfaceName);
}
+ /**
+ * update javadoc token
+ */
+ public void updateDoc()
+ {
+ resolve();
+ _subject.updateDoc();
+ }
/**
* Describe what the method does
@@ -239,12 +219,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public long lastModified() {
+ public long lastModified()
+ {
resolve();
return _subject.lastModified();
}
-
/**
* Describe what the method does
*
@@ -254,12 +234,13 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
- public int compareTo(Object o) {
+ public int compareTo( Object o )
+ {
XProgramElement other = (XProgramElement)o;
+
return qualifiedName().compareTo(other.qualifiedName());
}
-
/**
* Describe what the method does
*
@@ -267,11 +248,11 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public String toString() {
+ public String toString()
+ {
return qualifiedName();
}
-
/**
* Describe what the method does
*
@@ -283,12 +264,12 @@
* @todo-javadoc Write javadocs for return value
* @todo-javadoc Write javadocs for exception
*/
- public String save(File rootDir) throws IOException {
+ public String save( File rootDir ) throws IOException
+ {
resolve();
return _subject.save(rootDir);
}
-
/**
* Describe what the method does
*
@@ -296,11 +277,11 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public String qualifiedName() {
+ public String qualifiedName()
+ {
return _qualifiedName;
}
-
/**
* Describe what the method does
*
@@ -308,12 +289,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass containingClass() {
+ public XClass containingClass()
+ {
resolve();
return _subject.containingClass();
}
-
/**
* Describe what the method does
*
@@ -321,12 +302,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass[] innerClasses() {
+ public XClass[] innerClasses()
+ {
resolve();
return _subject.innerClasses();
}
-
/**
* Describe what the method does
*
@@ -334,12 +315,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public String name() {
+ public String name()
+ {
resolve();
return _subject.name();
}
-
/**
* Describe what the method does
*
@@ -347,12 +328,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XPackage containingPackage() {
+ public XPackage containingPackage()
+ {
resolve();
return _subject.containingPackage();
}
-
/**
* Describe what the method does
*
@@ -360,12 +341,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public String modifiers() {
+ public String modifiers()
+ {
resolve();
return _subject.modifiers();
}
-
/**
* Describe what the method does
*
@@ -373,12 +354,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public int modifierSpecifier() {
+ public int modifierSpecifier()
+ {
resolve();
return _subject.modifierSpecifier();
}
-
/**
* Describe what the method does
*
@@ -386,12 +367,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass superclass() {
+ public XClass superclass()
+ {
resolve();
return _subject.superclass();
}
-
/**
* Describe what the method does
*
@@ -399,12 +380,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass[] interfaces() {
+ public XClass[] interfaces()
+ {
resolve();
return _subject.interfaces();
}
-
/**
* Describe what the method does
*
@@ -412,12 +393,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XClass[] importedClasses() {
+ public XClass[] importedClasses()
+ {
resolve();
return _subject.importedClasses();
}
-
/**
* Describe what the method does
*
@@ -425,14 +406,15 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XMethod[] methods() {
- if (_subject == null) {
+ public XMethod[] methods()
+ {
+ if( _subject == null )
+ {
resolve();
}
return _subject.methods();
}
-
/**
* Describe what the method does
*
@@ -440,12 +422,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XField[] fields() {
+ public XField[] fields()
+ {
resolve();
return _subject.fields();
}
-
/**
* Describe what the method does
*
@@ -453,12 +435,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XConstructor[] constructors() {
+ public XConstructor[] constructors()
+ {
resolve();
return _subject.constructors();
}
-
/**
* Describe what the method does
*
@@ -466,12 +448,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XPackage[] importedPackages() {
+ public XPackage[] importedPackages()
+ {
resolve();
return _subject.importedPackages();
}
-
/**
* Describe what the method does
*
@@ -479,12 +461,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XDoc doc() {
+ public XDoc doc()
+ {
resolve();
return _subject.doc();
}
-
/**
* Describe what the method does
*
@@ -494,12 +476,12 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
- public boolean subclassOf(String className) {
+ public boolean subclassOf( String className )
+ {
resolve();
return _subject.subclassOf(className);
}
-
/**
* Describe what the method does
*
@@ -509,12 +491,12 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
- public boolean implementsInterface(String interfaceName) {
+ public boolean implementsInterface( String interfaceName )
+ {
resolve();
return _subject.implementsInterface(interfaceName);
}
-
/**
* Describe what the method does
*
@@ -522,12 +504,12 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public XProgramElement superElement() {
+ public XProgramElement superElement()
+ {
resolve();
return _subject.superElement();
}
-
/**
* Describe what the method does
*
@@ -537,11 +519,11 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
- public XClass qualify(final String unqualifiedClassName) {
+ public XClass qualify( final String unqualifiedClassName )
+ {
throw new RuntimeException("Don't call me");
}
-
/**
* Describe what the method does
*
@@ -551,17 +533,20 @@
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for return value
*/
- public boolean equals(Object o) {
- if (o instanceof XClass) {
+ public boolean equals( Object o )
+ {
+ if( o instanceof XClass )
+ {
XClass other = (XClass)o;
+
return qualifiedName().equals(other.qualifiedName());
}
- else {
+ else
+ {
return false;
}
}
-
/**
* Describe what the method does
*
@@ -569,24 +554,28 @@
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for return value
*/
- public int hashCode() {
+ public int hashCode()
+ {
return qualifiedName().hashCode();
}
-
/**
* Describe what the method does
*
* @todo-javadoc Write javadocs for method
*/
- private final void resolve() {
- if (_subject == null) {
+ private final void resolve()
+ {
+ if( _subject == null )
+ {
_subject = XJavaDoc.getInstance().getXClass(_qualifiedName,
false, _useNodeParser);
- if (_subject instanceof ProxyClass) {
+ if( _subject instanceof ProxyClass )
+ {
throw new IllegalStateException("Can't be a proxy for
a proxy! " + qualifiedName());
}
}
- if (_subject == null) {
+ if( _subject == null )
+ {
_subject =
XJavaDoc.getInstance().getUnknownClass(_qualifiedName);
}
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel