com.togethersoft.sca.ast
Interface AstInitializer

All Superinterfaces:
AstDbcProvider, AstDeclaration, AstElement, AstMember, AstMethod, AstObject

public interface AstInitializer
extends AstMethod

Represents a class initializer declared in a type. Instance and static initializers can be distingushed by the associated modifiers.


Fields inherited from interface com.togethersoft.sca.ast.AstObject
ARRAY_CREATION, ARRAY_INITIALIZER, ARRAY_REFERENCE, ASSERT_STATEMENT, ASSIGNMENT_EXPRESSION, BINARY_EXPRESSION, BREAK_STATEMENT, CASE_LABEL, CAST_EXPRESSION, CATCH_CLAUSE, CLASS_FILE, COMMENT, COMPILATION_UNIT, COMPOUND_STATEMENT, CONDITIONAL_EXPRESSION, CONSTRUCTOR_INVOCATION, CONTINUE_STATEMENT, DBC_RESULT, DECLARATION_STATEMENT, DO_STATEMENT, EMPTY_STATEMENT, EXPRESSION_STATEMENT, FIELD_REFERENCE, FINALLY_CLAUSE, FOR_STATEMENT, IF_STATEMENT, IMPORT, INITIALIZER, JAVADOC_TAG, LITERAL, METHOD, METHOD_CALL_EXPRESSION, N_A, OBJECT_CREATION_EXPRESSION, PACKAGE, PARENTHESIZED_EXPRESSION, RETURN_STATEMENT, SIMPLE_REFERENCE, SUPER_EXPRESSION, SWITCH_GROUP, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THIS_EXPRESSION, THROW_SPECIFIER, THROW_STATEMENT, TRY_STATEMENT, TYPE, TYPE_EXPRESSION, UNARY_EXPRESSION, VARIABLE, VARIABLE_DECLARATION, WHILE_STATEMENT
 
Method Summary
 AstCompoundStatement getBody()
          Returns the body of this class initializer.
 java.lang.String getElementName()
          Returns the name of this class initializer which is always "<clinit>".
 AstVariable[] getParameters()
          Returns am empty array since class initializers have no parameters.
 AstTypeReference getReturnType()
          Returns a reference to the void type since class initializers have no return type.
 
Methods inherited from interface com.togethersoft.sca.ast.AstMethod
getExceptionTypes, getOverridden, getQualifiedName, getSignature, isConstructor, isErrorFree, isInitializer, overriddenBy
 
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

getBody

public AstCompoundStatement getBody()
Returns the body of this class initializer.
Specified by:
getBody in interface AstMethod
Returns:
the body of this initializer.

getElementName

public java.lang.String getElementName()
Returns the name of this class initializer which is always "<clinit>".
Specified by:
getElementName in interface AstMethod
Returns:
the name of this initializer.

getParameters

public AstVariable[] getParameters()
Returns am empty array since class initializers have no parameters.
Specified by:
getParameters in interface AstMethod
Returns:
an empty array.

getReturnType

public AstTypeReference getReturnType()
Returns a reference to the void type since class initializers have no return type.
Specified by:
getReturnType in interface AstMethod
Returns:
the void type.