|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class represents any type: source class, binary class or primitive type.
Method Summary | |
java.util.List |
getAllSubclasses()
Returns the (known) subclasses, regardless of how deep in the class hierarchy. |
XConstructor |
getConstructor(java.lang.String constructorNameWithSignature)
Gets the constructor with the given signature. |
java.util.List |
getConstructors()
|
XClass |
getContainingClass()
Returns the containing class, if this is an inner class. |
XPackage |
getContainingPackage()
Returns the package this class lives in. |
java.util.List |
getDirectSubclasses()
Returns the (known) direct subclasses. |
java.util.List |
getExtendingInterfaces()
Return the (known) interfaces that extend this interface. |
XField |
getField(java.lang.String name)
|
java.util.List |
getFields()
|
java.util.List |
getFields(boolean superclasses)
|
java.util.List |
getImplementingClasses()
Return the (known) classes that implement this interface. |
java.util.List |
getImportedClasses()
Returns the imported classes. |
java.util.List |
getImportedPackages()
|
java.util.List |
getInnerClasses()
Returns the inner classes. |
java.util.List |
getInterfaces()
Returns all the interfaces implemented by this class. |
XMethod |
getMethod(java.lang.String methodNameWithSignature)
|
XMethod |
getMethod(java.lang.String methodNameWithSignature,
boolean superclasses)
Returns an XMethod with the given name and parameters. |
java.util.List |
getMethods()
Returns all the methods, not including superclasses |
java.util.List |
getMethods(boolean superclasses)
Returns all the methods. |
java.util.List |
getMethods(Predicate predicate,
boolean superclasses)
Returns all the methods that are accepted by the filter. |
java.util.List |
getMethodTags(java.lang.String tagName,
boolean superclasses)
Returns a collection of tags from the methods in this class (or superclasses). |
java.lang.String |
getQualifiedName()
Gets the qualified class name. |
XClass |
getSuperclass()
Return superclass of this class. |
java.lang.String |
getTransformedName()
Gets the transformed class name, for example: Character$Subset |
java.lang.String |
getTransformedQualifiedName()
Gets the transformed qualified class name, for example: java.lang.Character$Subset |
java.lang.String |
getType()
Gets the type, e.g. |
boolean |
isA(java.lang.String full_qualified_type_name)
Returns true if we are subclass or implement the class/interface with the name classOrInterfaceName |
boolean |
isA(java.lang.String full_qualified_type_name,
boolean superclases)
Returns true if we are subclass or implement the class/interface with the name classOrInterfaceName |
boolean |
isAbstract()
|
boolean |
isAnonymous()
Returns true if this class is anonymous. |
boolean |
isImplementingInterface(java.lang.String full_qualified_type_name)
Returns true if it implements full_qualified_type_name (or recursively superclasses implement). |
boolean |
isImplementingInterface(java.lang.String full_qualified_type_name,
boolean superclasses)
Returns true if it implements full_qualified_type_name (or recursively superclasses implement, if superclasses==true). |
boolean |
isInner()
Returns true if this is an inner class. |
boolean |
isInterface()
|
boolean |
isPrimitive()
Returns true if this class is a primitive. |
boolean |
isSubclassOf(java.lang.String full_qualified_type_name)
Returns true if the superclass (or recursively superclass of superclass) is full_qualified_type_name. |
boolean |
isSubclassOf(java.lang.String full_qualified_type_name,
boolean superclasses)
Returns true if the superclass (or recursively superclass of superclass, if superclasses==true) is full_qualified_type_name. |
boolean |
isWriteable()
Returns true if this instance can be saved. |
long |
lastModified()
|
XClass |
qualify(java.lang.String unqualifiedClassName)
|
java.lang.String |
save(java.io.File rootDir)
|
boolean |
saveNeeded()
whether class needs saving |
void |
setDirty()
mark this class dirty for saving |
Methods inherited from interface xjavadoc.XProgramElement |
getDoc, getModifiers, getModifierSpecifier, getSuperElement, getSuperInterfaceElements, getXJavaDoc, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, updateDoc |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface xjavadoc.Named |
getName |
Method Detail |
public boolean isInner()
public XClass getContainingClass()
getContainingClass
in interface XProgramElement
public boolean isPrimitive()
public boolean isAnonymous()
public java.lang.String getQualifiedName()
public java.lang.String getTransformedName()
Character$Subset
public java.lang.String getTransformedQualifiedName()
java.lang.Character$Subset
public java.lang.String getType()
java.lang.String.class
or java.lang.Integer.TYPE
.
public XConstructor getConstructor(java.lang.String constructorNameWithSignature)
constructorNameWithSignature
- the signature of the constructor, e.g.
Foo(int,java.lang.String)>/code>.
- Returns:
- the constructor.
public XField getField(java.lang.String name)
public boolean isAbstract()
isAbstract
in interface XProgramElement
public boolean isA(java.lang.String full_qualified_type_name)
full_qualified_type_name
- The full qualified type name
public boolean isA(java.lang.String full_qualified_type_name, boolean superclases)
full_qualified_type_name
- The full qualified type namesuperclases
- whether the isA search should search the
whole hierarchy
public XClass getSuperclass()
public java.util.List getDirectSubclasses()
public java.util.List getAllSubclasses()
public java.util.List getImplementingClasses()
public java.util.List getExtendingInterfaces()
public java.util.List getInterfaces()
XClass
.public XMethod getMethod(java.lang.String methodNameWithSignature, boolean superclasses)
methodNameWithSignature
- Describe what the parameter doessuperclasses
- Looks in superclasses too if true
public XMethod getMethod(java.lang.String methodNameWithSignature)
methodNameWithSignature
-
public java.lang.String save(java.io.File rootDir) throws java.io.IOException
java.io.IOException
public XPackage getContainingPackage()
getContainingPackage
in interface XProgramElement
public java.util.List getImportedClasses()
XClass
.public java.util.List getInnerClasses()
XClass
.public java.util.List getMethods(boolean superclasses)
superclasses
- if true, include methods from superclasses and
interfaces too.
public java.util.List getMethods(Predicate predicate, boolean superclasses)
superclasses
- if true, include methods from superclasses too.predicate
-
public java.util.List getMethods()
public java.util.List getFields()
public java.util.List getFields(boolean superclasses)
public java.util.List getConstructors()
public java.util.List getImportedPackages()
public boolean isSubclassOf(java.lang.String full_qualified_type_name)
full_qualified_type_name
- Describe what the parameter does
public boolean isSubclassOf(java.lang.String full_qualified_type_name, boolean superclasses)
full_qualified_type_name
- Describe what the parameter doessuperclasses
- Looks in superclasses too if true
public boolean isImplementingInterface(java.lang.String full_qualified_type_name)
full_qualified_type_name
- Describe what the parameter does
public boolean isImplementingInterface(java.lang.String full_qualified_type_name, boolean superclasses)
full_qualified_type_name
- Describe what the parameter doessuperclasses
- Looks in superclasses too if true
public boolean isWriteable()
public void setDirty()
public boolean saveNeeded()
public long lastModified()
public boolean isInterface()
public java.util.List getMethodTags(java.lang.String tagName, boolean superclasses)
superclasses
- tagName
-
XTag
. If no tags are found, an empty
List is returned.public XClass qualify(java.lang.String unqualifiedClassName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |