Package com.thoughtworks.qdox.model
Class JavaClass
java.lang.Object
com.thoughtworks.qdox.model.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.AbstractJavaEntity
com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
com.thoughtworks.qdox.model.JavaClass
- All Implemented Interfaces:
JavaClassParent
,Serializable
,Comparable
- Author:
- Joe Walnes, Aslak Hellesøy
- See Also:
-
Field Summary
Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
modifiers
Fields inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity
name, parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addMethod
(JavaMethod meth) asType()
int
Gets bean properties without looking in superclasses or interfaces.getBeanProperties
(boolean superclasses) getBeanProperty
(String propertyName) Gets bean property without looking in superclasses or interfaces.getBeanProperty
(String propertyName, boolean superclasses) Deprecated.Gets the known derived classes.getFieldByName
(String name) Type[]
getInnerClassByName
(String name) Deprecated.old name forgetNestedClassByName(String)
Deprecated.old name forgetNestedClasses()
This should be the signature for getMethodBySignaturegetMethodBySignature
(String name, Type[] parameterTypes) getMethodBySignature
(String name, Type[] parameterTypes, boolean superclasses) getMethodBySignature
(String name, Type[] parameterTypes, boolean superclasses, boolean varArg) getMethods
(boolean superclasses) getMethodsBySignature
(String name, Type[] parameterTypes, boolean superclasses) getMethodsBySignature
(String name, Type[] parameterTypes, boolean superclasses, boolean varArg) getNestedClassByName
(String name) If this class has a package, the packagename will be returned.Shorthand for getSuperClass().getJavaClass() with null checking.getTagsByName
(String name, boolean superclasses) boolean
boolean
boolean
isEnum()
is enum? (otherwise class or interface)boolean
isInner()
boolean
is interface? (otherwise enum or class)resolveType
(String typeName) Resolve a type-name within the context of this source or class.void
setAnnotation
(boolean isAnnotation) void
setEnum
(boolean isEnum) void
setImplementz
(Type[] implementz) void
setInterface
(boolean interfce) void
setJavaClassContext
(JavaClassContext context) void
setJavaPackage
(JavaPackage javaPackage) Only used when constructing the model by hand / without sourcevoid
setSource
(JavaSource source) void
setSuperClass
(Type type) void
setTypeParameters
(TypeVariable[] typeParameters) toString()
protected void
writeBody
(IndentBuffer result) Methods inherited from class com.thoughtworks.qdox.model.AbstractInheritableJavaEntity
getTagByName
Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity
getCodeBlock, getComment, getModifiers, getNamedParameter, getParentClass, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setParentClass, setTags, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers
Methods inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity
getAnnotations, getLineNumber, getName, setAnnotations, setLineNumber, setName, setParent
-
Constructor Details
-
JavaClass
public JavaClass() -
JavaClass
-
-
Method Details
-
setJavaClassContext
-
isInterface
public boolean isInterface()is interface? (otherwise enum or class) -
isEnum
public boolean isEnum()is enum? (otherwise class or interface) -
getSuperClass
-
getSuperJavaClass
Shorthand for getSuperClass().getJavaClass() with null checking. -
getImplements
-
getImplementedInterfaces
- Since:
- 1.3
-
writeBody
- Specified by:
writeBody
in classAbstractJavaEntity
-
setInterface
public void setInterface(boolean interfce) -
setEnum
public void setEnum(boolean isEnum) -
setAnnotation
public void setAnnotation(boolean isAnnotation) -
addMethod
-
setSuperClass
-
setImplementz
-
getTypeParameters
-
setTypeParameters
-
addField
-
setJavaPackage
Only used when constructing the model by hand / without source- Parameters:
javaPackage
-
-
setSource
-
getParentSource
- Specified by:
getParentSource
in interfaceJavaClassParent
-
getSource
- Overrides:
getSource
in classAbstractJavaEntity
-
getPackage
-
getParent
- Overrides:
getParent
in classAbstractBaseJavaEntity
- Returns:
-
getPackageName
If this class has a package, the packagename will be returned. Otherwise an empty String.- Returns:
-
getFullyQualifiedName
-
isInner
public boolean isInner()- Since:
- 1.3
-
resolveType
Description copied from interface:JavaClassParent
Resolve a type-name within the context of this source or class.- Specified by:
resolveType
in interfaceJavaClassParent
- Parameters:
typeName
- name of a type- Returns:
- the fully-qualified name of the type, or null if it cannot be resolved
-
getJavaClassContext
- Specified by:
getJavaClassContext
in interfaceJavaClassParent
-
getClassNamePrefix
- Specified by:
getClassNamePrefix
in interfaceJavaClassParent
-
asType
-
getMethods
-
getMethods
- Since:
- 1.3
-
getMethodBySignature
- Parameters:
name
- method nameparameterTypes
- parameter types or null if there are no parameters.- Returns:
- the matching method or null if no match is found.
-
getMethod
This should be the signature for getMethodBySignature- Parameters:
name
-parameterTypes
-varArgs
-- Returns:
-
getMethodBySignature
- Parameters:
name
-parameterTypes
-superclasses
-- Returns:
-
getMethodBySignature
public JavaMethod getMethodBySignature(String name, Type[] parameterTypes, boolean superclasses, boolean varArg) - Parameters:
name
-parameterTypes
-superclasses
-varArg
-- Returns:
-
getMethodsBySignature
- Parameters:
name
-parameterTypes
-superclasses
-- Returns:
-
getMethodsBySignature
public JavaMethod[] getMethodsBySignature(String name, Type[] parameterTypes, boolean superclasses, boolean varArg) - Parameters:
name
-parameterTypes
-superclasses
-varArg
-- Returns:
-
getFields
-
getFieldByName
-
addClass
- Specified by:
addClass
in interfaceJavaClassParent
-
getClasses
Deprecated.UsegetNestedClasses()
instead. -
getNestedClasses
- Since:
- 1.3
-
getNestedClassByName
- Specified by:
getNestedClassByName
in interfaceJavaClassParent
-
getInnerClasses
Deprecated.old name forgetNestedClasses()
-
getInnerClassByName
Deprecated.old name forgetNestedClassByName(String)
-
isA
- Since:
- 1.3
-
isA
- Since:
- 1.3
-
getBeanProperties
Gets bean properties without looking in superclasses or interfaces.- Since:
- 1.3
-
getBeanProperties
- Since:
- 1.3
-
getBeanProperty
Gets bean property without looking in superclasses or interfaces.- Since:
- 1.3
-
getBeanProperty
- Since:
- 1.3
-
getDerivedClasses
Gets the known derived classes. That is, subclasses or implementing classes. -
getTagsByName
- Specified by:
getTagsByName
in classAbstractInheritableJavaEntity
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
toString
-
getNestedClasses()
instead.