|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.BaseAST
antlr.CommonAST
antlr.CommonASTWithHiddenTokens
jparse.JavaAST
jparse.expr.ExpressionAST
jparse.expr.IdentifierAST
jparse.expr.VarAST
An AST node that represents a variable definition or formal parameter
Field Summary | |
private JavaAST |
brackets
Any trailing array brackets on the declaration |
private TypeAST |
declType
The declared type of this variable |
private boolean |
field
true if this is a field (static or instance variable);
false if this is a local variable (including parameters) |
private InitializerAST |
initializer
The initializer (if any) for this variable |
private ModifierAST |
mods
The modifiers for this variable |
Fields inherited from class jparse.expr.IdentifierAST |
|
Fields inherited from class jparse.expr.ExpressionAST |
exceptions, nonconstant, type, value |
Fields inherited from class jparse.JavaAST |
context, currSymTable, noTypes, symTable, topLevel, typeAST |
Fields inherited from class antlr.CommonASTWithHiddenTokens |
hiddenAfter, hiddenBefore |
Fields inherited from class antlr.CommonAST |
|
Fields inherited from class antlr.BaseAST |
down, right |
Constructor Summary | |
VarAST(antlr.Token token)
Create a new variable AST |
Method Summary | |
protected Type[] |
computeExceptions()
Compute the checked exception types that might be thrown by this expression |
protected Type |
computeType()
Compute the type of this expression |
protected Object |
computeValue()
Compute the constant value of this expression, if any |
JavaAST |
getBrackets()
Get the brackets modifying the type name, if those brackets follow the variable name |
InitializerAST |
getInitializer()
Get the initializer for this variable |
ModifierAST |
getModifiers()
Get the modifiers for this variable |
TypeAST |
getTypeName()
Get the name of the declared type for this variable |
VarList |
getVarList()
Get the list of variables read and written by this expression |
boolean |
isField()
Determine whether this variable is a field (static or instance variable) or a local variable or parameter |
void |
parseComplete()
Compute any derived attributes that must be evaluated after the initial parse. |
String |
toString()
|
Methods inherited from class jparse.expr.IdentifierAST |
compareTo, getName, setMethod, setName |
Methods inherited from class jparse.expr.ExpressionAST |
getExceptionTypes, getValue, retrieveType |
Methods inherited from class jparse.JavaAST |
print, printHiddenAfter, printHiddenBefore |
Methods inherited from class antlr.CommonASTWithHiddenTokens |
getHiddenAfter, getHiddenBefore, initialize |
Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, setText, setType |
Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ModifierAST mods
private TypeAST declType
private JavaAST brackets
private InitializerAST initializer
private boolean field
true
if this is a field (static or instance variable);
false
if this is a local variable (including parameters)
Constructor Detail |
public VarAST(antlr.Token token)
token
- the token represented by this AST nodeMethod Detail |
public void parseComplete()
JavaAST
parseComplete
in class JavaAST
protected Type computeType()
ExpressionAST
computeType
in class IdentifierAST
protected Type[] computeExceptions()
ExpressionAST
computeExceptions
in class IdentifierAST
protected Object computeValue()
ExpressionAST
computeValue
in class IdentifierAST
public VarList getVarList()
ExpressionAST
getVarList
in class IdentifierAST
public ModifierAST getModifiers()
public TypeAST getTypeName()
public JavaAST getBrackets()
null
if there
are nonepublic InitializerAST getInitializer()
null
if
there is not onepublic boolean isField()
true
if this variable is a field;
false
otherwisepublic String toString()
toString
in interface antlr.collections.AST
toString
in class IdentifierAST
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |