|
|||||||||||
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.NewAST
An AST node that represents a "new" expression
Field Summary | |
private TypeAST |
anonymous
If this is a new anonymous type, this is the AST for the anonymous class |
private int |
dimensions
If this is a new array expression, this is the number of dimensions in the array |
private ListAST |
parameters
The parameters, for an object constructor |
private Constructor |
theCons
The constructor being accessed by this use of new |
private IdentifierAST |
typeName
The type to instantiate |
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 | |
NewAST(antlr.Token token)
Create a new "new" expression 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 |
int |
getDimensions()
Get the number of dimensions in the array to create |
ListAST |
getParameters()
Get the parameters to the object constructor |
IdentifierAST |
getTypeName()
Get the name of the type to instantiate |
VarList |
getVarList()
Get the list of variables read and written by this expression |
void |
parseComplete()
Compute any derived attributes that must be evaluated after the initial parse. |
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, toString, 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 IdentifierAST typeName
private TypeAST anonymous
private int dimensions
private ListAST parameters
private Constructor theCons
new
Constructor Detail |
public NewAST(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 ExpressionAST
protected Object computeValue()
ExpressionAST
computeValue
in class ExpressionAST
protected Type[] computeExceptions()
ExpressionAST
computeExceptions
in class ExpressionAST
public VarList getVarList()
ExpressionAST
getVarList
in class ExpressionAST
public IdentifierAST getTypeName()
public int getDimensions()
new
is creating an objectpublic ListAST getParameters()
null
if this use of new
is creating an array
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |