com.togethersoft.sca.ast
Interface AstVariable
- All Superinterfaces:
- AstDeclaration, AstElement, AstObject
- All Known Subinterfaces:
- AstField
- public interface AstVariable
- extends AstDeclaration
Represents a local variable, method, constructor or catch clause parameter.
The parent of a method or constructor parameter is the declaring method.
The parent of a catch clause parameter is the catch caluse. The parent of
a local variable is the compound statement in which the variable is declared.
| 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 |
| 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 |
getElementName
public java.lang.String getElementName()
- Returns the simple name of this variable.
- Specified by:
getElementName in interface AstElement
- Returns:
- the simple name of this variable.
getInitializer
public AstExpression getInitializer()
- Returns the initializer for this variable, or
null
if it has no initializer.
- Returns:
- the initializer of this variable.
getSignature
public java.lang.String getSignature()
- Returns the type signature of this variable.
- Returns:
- the variable's type signature.
- See Also:
AstTypeReference
getType
public AstTypeReference getType()
- Returns a reference to the type of this variable.
- Returns:
- a reference to the type of this variable.