|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Represents a method or constructor declared in a type.
| Method Summary | |
AstCompoundStatement |
getBody()
Returns the body of this method. |
java.lang.String |
getElementName()
Returns the simple name of this method. |
AstTypeReference[] |
getExceptionTypes()
Returns types of the exceptions this method throws, in the order declared in the source. |
AstMethod[] |
getOverridden()
Returns all the methods this method overrides or implements. |
AstVariable[] |
getParameters()
Returns the parameters of this method. |
java.lang.String |
getQualifiedName()
Returns the fully qualified name of this method, including qualification for any containing types and packages. |
AstTypeReference |
getReturnType()
Returns type of the return value of this method. |
java.lang.String |
getSignature()
Returns the signature of the method. |
boolean |
isConstructor()
Returns true if this is a constructor, false
otherwise. |
boolean |
isErrorFree()
Returns true if this method does not contain syntactic and
semantic errors, all the referred types are successfully resolved. |
boolean |
isInitializer()
Returns true if this is an initializer, false
otherwise. |
AstMethod[] |
overriddenBy()
Returns all the methods in the model that override or implement this method. |
| 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.AstDbcProvider |
getInvariants, getPostconditions, getPreconditions |
| Method Detail |
public AstCompoundStatement getBody()
getBody will return
null for abstract, native and binary methods.public java.lang.String getElementName()
"<init>").
For the class initialization methods in binary types, this returns
the special name "<clinit>".getElementName in interface AstElementpublic AstTypeReference[] getExceptionTypes()
public AstMethod[] getOverridden()
The methods are returned in no particular order. An empty array is returned if this method does not override any methods.
public AstVariable[] getParameters()
public java.lang.String getQualifiedName()
getQualifiedName in interface AstMemberpublic AstTypeReference getReturnType()
public java.lang.String getSignature()
For example, a source method declared as
public void foo(String text, int length)
would return "(Ljava/lang/String;I)V".
public boolean isConstructor()
true if this is a constructor, false
otherwise.true if this is a constructor.public boolean isErrorFree()
true if this method does not contain syntactic and
semantic errors, all the referred types are successfully resolved.public boolean isInitializer()
true if this is an initializer, false
otherwise.true if this is a class initializer.public AstMethod[] overriddenBy()
The methods are returned in no particular order. An empty array is returned if no methods override this method.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||