|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Represents a type (a class or interface) defined either in a source file or in a binary class file.
| Fields inherited from interface com.togethersoft.sca.ast.AstTypeReference |
TID_BAD, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_INTERFACE, TID_LONG, TID_NULL, TID_SHORT, TID_VOID |
| Method Summary | |
AstField |
findField(java.lang.String name,
boolean searchInherited)
Returns the field with the specified name. |
AstMethod |
findMethod(java.lang.String name,
java.lang.String signature,
boolean searchInherited)
Returns the method with the specified name and signature. |
AstType |
findType(java.lang.String name,
boolean searchInherited)
Returns the nested type with the specified name declared by this type. |
AstField[] |
getAllFields()
Returns all the fields of this type. |
AstMethod[] |
getAllMethods()
Returns all the methods of this type. |
AstClassFile |
getClassFile()
Returns the binary file in which this type is declared, or null if this type is not declared in a binary type
(a source type). |
AstMethod[] |
getConstructors()
Returns the constructors declared by this type. |
java.lang.String |
getElementName()
Returns the simple name of this type, unqualified by package or enclosing type. |
AstMethod[] |
getExecutableFragments()
Returns the methods, constructors, and initializers declared by this type. |
AstType[] |
getExportCouplings()
Returns the types that directly depends on this type. |
AstField[] |
getFields()
Returns the fields declared by this type. |
AstType[] |
getImportCouplings()
Returns the types on which this type directly depends. |
AstInitializer[] |
getInitializers()
Returns the initializers declared by this type. |
AstDeclaration[] |
getMembers()
Return array of all declarations in the class |
AstMethod[] |
getMethods()
Returns the methods declared by this type. |
java.lang.String |
getQualifiedName()
Returns the fully qualified name of this type, including qualification for any containing types and packages. |
AstType[] |
getSubtypes()
Returns the types that are directly derived from this type. |
AstType |
getSuperClass()
Returns this type's superclass, or null for the
"java/lang/Object" type. |
AstType[] |
getSuperInterfaces()
Returns the interfaces that this type implements or extends, in the order in which they are listed in the source. |
java.lang.String |
getTypeQualifiedName()
Returns the type-qualified name of this type, including qualification for any enclosing types, but not including package qualification. |
AstType[] |
getTypes()
Returns the immediate member types declared by this type. |
AstVarDeclaration[] |
getVarDeclarations()
Return array of class variables declaraions (for declaration "int x,y,z;" this method will return the single declaration) |
boolean |
isBinary()
Returns true if this type was loaded from a class file,
otherwise false. |
boolean |
isClass()
Returns true if this type represents a class,
otherwise false. |
boolean |
isDerivedFrom(AstType type)
Determines if the class or interface represented by this AstType
object is derived from the class or interface represented by the specified
AstType parameter. |
boolean |
isDerivedFrom(java.lang.String typeName)
Determines if the class or interface represented by this AstType
object is derived from the class or interface represented by the specified
String parameter. |
boolean |
isInterface()
Returns true if this type represents an interface,
otherwise false. |
boolean |
isSource()
Returns true if this type was loaded from a Java source,
otherwise false. |
| Methods inherited from interface com.togethersoft.sca.ast.AstDeclaration |
getDeclaredModifiers, getModifiers, getModifiersList, getReferences, isAbstract, isFinal, isNative, isPackage, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setDeclaredModifiers, swapWith |
| Methods inherited from interface com.togethersoft.sca.ast.AstObject |
addComment, getChildren, getComments, getCompilationUnit, getDeclaringMethod, getDeclaringType, getObjectKind, getPackage, getParent, getPosition, isDeleted, remove, replaceWith, replaceWith, setPosition, setPositionAfter, visitExpressions, visitStatements |
| Methods inherited from interface com.togethersoft.sca.ast.AstTypeReference |
getBaseType, getKind, getSignature, getTypeName, isAssignableTo, isDerivedFrom, numDimensions |
| Methods inherited from interface com.togethersoft.sca.ast.AstDbcProvider |
getInvariants, getPostconditions, getPreconditions |
| Method Detail |
public AstField findField(java.lang.String name,
boolean searchInherited)
null,
if the field with the specified name does not exist.name - specifies name of the field, for example "table".searchInherited - specifies whether inherited fields will be included
in search.
public AstMethod findMethod(java.lang.String name,
java.lang.String signature,
boolean searchInherited)
null, if the method with the specified name and signature
does not exist. The signature format is the same as specified for
AstMethod.getSignature().name - specifies name of the method, for example "compareTo".signature - specifies signature of the method, for example
"(Ljava/lang/String)I".searchInherited - specifies whether inherited methods will be included
in search.AstMethod.getSignature()
public AstType findType(java.lang.String name,
boolean searchInherited)
null, if the type with the specified name does not exist.name - specifies simple name of the type, for example
"Entry".searchInherited - specifies whether inherited members will be included
in search.public AstField[] getAllFields()
public AstMethod[] getAllMethods()
public AstClassFile getClassFile()
null if this type is not declared in a binary type
(a source type).public AstMethod[] getConstructors()
public java.lang.String getElementName()
getElementName in interface AstElementcom.togethersoft.sca.ast.AstElementpublic AstMethod[] getExecutableFragments()
public AstType[] getExportCouplings()
public AstField[] getFields()
public AstType[] getImportCouplings()
public AstInitializer[] getInitializers()
public AstDeclaration[] getMembers()
public AstMethod[] getMethods()
<clinit> method
and synthetic methods.
If this is a source type, the results are listed in the order
in which they appear in the source, otherwise, the results are
in no particular order.public java.lang.String getQualifiedName()
'/',
followed by the type-qualified name.getQualifiedName in interface AstMembercom.togethersoft.sca.ast.AstMemberpublic AstType[] getSubtypes()
An empty array is returned if no type is derived from this type.
public AstType getSuperClass()
null for the
"java/lang/Object" type. For interfaces, the superclass
is always "java/lang/Object".public AstType[] getSuperInterfaces()
public java.lang.String getTypeQualifiedName()
"$",
followed by the simple name of this type.
For binary types, this is the name of the class file without the ".class" suffix.public AstType[] getTypes()
public AstVarDeclaration[] getVarDeclarations()
public boolean isBinary()
true if this type was loaded from a class file,
otherwise false.public boolean isClass()
true if this type represents a class,
otherwise false.public boolean isDerivedFrom(AstType type)
AstType
object is derived from the class or interface represented by the specified
AstType parameter. For classes, isDerivedFrom
returns true if this class extends the specified class,
or implements the specified interface. For interface, isDerivedFrom
returns true if this interface extends the specified interface.type - the AstType object to be checked.true if this type is derived from type.public boolean isDerivedFrom(java.lang.String typeName)
AstType
object is derived from the class or interface represented by the specified
String parameter. For classes, isDerivedFrom
returns true if this class extends the specified class,
or implements the specified interface. For interface, isDerivedFrom
returns true if this interface extends the specified interface.type - the name of the type to be checked, for example
java/lang/Runnable.true if this type is derived from type.public boolean isInterface()
true if this type represents an interface,
otherwise false.public boolean isSource()
true if this type was loaded from a Java source,
otherwise false.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||