com.thoughtworks.qdox.model
Class JavaClass

java.lang.Object
  extended bycom.thoughtworks.qdox.model.AbstractJavaEntity
      extended bycom.thoughtworks.qdox.model.AbstractInheritableJavaEntity
          extended bycom.thoughtworks.qdox.model.JavaClass
All Implemented Interfaces:
JavaClassParent, Serializable

public class JavaClass
extends AbstractInheritableJavaEntity
implements JavaClassParent

Author:
Joe Walnes, Aslak Hellesøy
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
modifiers, name
 
Constructor Summary
JavaClass(JavaClassParent parent)
           
 
Method Summary
 void addClass(JavaClass cls)
           
 void addField(JavaField javaField)
           
 void addMethod(JavaMethod meth)
           
 String asClassNamespace()
           
 Type asType()
           
 BeanProperty[] getBeanProperties()
          Gets bean properties without looking in superclasses or interfaces.
 BeanProperty[] getBeanProperties(boolean superclasses)
           
 BeanProperty getBeanProperty(String propertyName)
          Gets bean property without looking in superclasses or interfaces.
 BeanProperty getBeanProperty(String propertyName, boolean superclasses)
           
 JavaClass[] getClasses()
          Deprecated. Use getInnerClasses() instead.
 ClassLibrary getClassLibrary()
           
 JavaClass[] getDerivedClasses()
           
 JavaField getFieldByName(String name)
           
 JavaField[] getFields()
           
 String getFullyQualifiedName()
           
 JavaClass[] getImplementedInterfaces()
           
 Type[] getImplements()
           
 JavaClass getInnerClassByName(String name)
           
 JavaClass[] getInnerClasses()
           
 JavaMethod getMethodBySignature(String name, Type[] parameterTypes)
           
 JavaMethod getMethodBySignature(String name, Type[] parameterTypes, boolean superclasses)
           
 JavaMethod[] getMethods()
           
 JavaMethod[] getMethods(boolean superclasses)
          since 1.3
 JavaMethod[] getMethodsBySignature(String name, Type[] parameterTypes, boolean superclasses)
           
 String getPackage()
           
 JavaClassParent getParent()
           
 JavaSource getParentSource()
           
 Type getSuperClass()
           
 JavaClass getSuperJavaClass()
          Shorthand for getSuperClass().getJavaClass() with null checking.
 DocletTag[] getTagsByName(String name, boolean superclasses)
           
 boolean isA(JavaClass javaClass)
           
 boolean isA(String fullClassName)
           
 boolean isInner()
           
 boolean isInterface()
          Interface or class?
 String resolveType(String typeName)
          Resolve a type-name within the context of this source or class.
 void setImplementz(Type[] implementz)
           
 void setInterface(boolean interfce)
           
 void setJavaClassCache(JavaClassCache javaClassCache)
           
 void setSuperClass(Type type)
           
protected  void writeBody(IndentBuffer result)
           
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
getTagByName
 
Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
getComment, getModifiers, getName, getNamedParameter, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isTransient, setComment, setModifiers, setName, setTags, toString, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaClass

public JavaClass(JavaClassParent parent)
Method Detail

setJavaClassCache

public void setJavaClassCache(JavaClassCache javaClassCache)

isInterface

public boolean isInterface()
Interface or class?


getSuperClass

public Type getSuperClass()

getSuperJavaClass

public JavaClass getSuperJavaClass()
Shorthand for getSuperClass().getJavaClass() with null checking.


getImplements

public Type[] getImplements()

getImplementedInterfaces

public JavaClass[] getImplementedInterfaces()
Since:
1.3

writeBody

protected void writeBody(IndentBuffer result)
Specified by:
writeBody in class AbstractJavaEntity

setInterface

public void setInterface(boolean interfce)

addMethod

public void addMethod(JavaMethod meth)

setSuperClass

public void setSuperClass(Type type)

setImplementz

public void setImplementz(Type[] implementz)

addField

public void addField(JavaField javaField)

getParent

public JavaClassParent getParent()

getParentSource

public JavaSource getParentSource()
Specified by:
getParentSource in interface JavaClassParent

getPackage

public String getPackage()

getFullyQualifiedName

public String getFullyQualifiedName()

isInner

public boolean isInner()
Since:
1.3

resolveType

public String resolveType(String typeName)
Description copied from interface: JavaClassParent
Resolve a type-name within the context of this source or class.

Specified by:
resolveType in interface JavaClassParent
Parameters:
typeName - name of a type
Returns:
the fully-qualified name of the type, or null if it cannot be resolved

getClassLibrary

public ClassLibrary getClassLibrary()
Specified by:
getClassLibrary in interface JavaClassParent

asClassNamespace

public String asClassNamespace()
Specified by:
asClassNamespace in interface JavaClassParent

asType

public Type asType()

getMethods

public JavaMethod[] getMethods()

getMethods

public JavaMethod[] getMethods(boolean superclasses)
since 1.3


getMethodBySignature

public JavaMethod getMethodBySignature(String name,
                                       Type[] parameterTypes)
Parameters:
name - method name
parameterTypes - parameter types or null if there are no parameters.
Returns:
the matching method or null if no match is found.

getMethodBySignature

public JavaMethod getMethodBySignature(String name,
                                       Type[] parameterTypes,
                                       boolean superclasses)

getMethodsBySignature

public JavaMethod[] getMethodsBySignature(String name,
                                          Type[] parameterTypes,
                                          boolean superclasses)

getFields

public JavaField[] getFields()

getFieldByName

public JavaField getFieldByName(String name)

addClass

public void addClass(JavaClass cls)
Specified by:
addClass in interface JavaClassParent

getClasses

public JavaClass[] getClasses()
Deprecated. Use getInnerClasses() instead.


getInnerClasses

public JavaClass[] getInnerClasses()
Since:
1.3

getInnerClassByName

public JavaClass getInnerClassByName(String name)

isA

public boolean isA(String fullClassName)
Since:
1.3

isA

public boolean isA(JavaClass javaClass)
Since:
1.3

getBeanProperties

public BeanProperty[] getBeanProperties()
Gets bean properties without looking in superclasses or interfaces.

Since:
1.3

getBeanProperties

public BeanProperty[] getBeanProperties(boolean superclasses)
Since:
1.3

getBeanProperty

public BeanProperty getBeanProperty(String propertyName)
Gets bean property without looking in superclasses or interfaces.

Since:
1.3

getBeanProperty

public BeanProperty getBeanProperty(String propertyName,
                                    boolean superclasses)
Since:
1.3

getDerivedClasses

public JavaClass[] getDerivedClasses()

getTagsByName

public DocletTag[] getTagsByName(String name,
                                 boolean superclasses)
Specified by:
getTagsByName in class AbstractInheritableJavaEntity


Copyright © 2002-2003 ThoughtWorks, Inc. All Rights Reserved.