|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A NewArray
represents a new array expression such as new
File[8][] { null }
. It consists of an element type (e.g.,
File
), a list of dimension expressions (e.g., 8), 0 or more
additional dimensions (e.g., 1 for []), and an array initializer. The
dimensions of the array initializer must equal the number of additional "[]"
dimensions.
Method Summary | |
int |
additionalDims()
The number of additional dimensions. |
NewArray |
additionalDims(int addDims)
Set the number of additional dimensions. |
TypeNode |
baseType()
The array's base type. |
NewArray |
baseType(TypeNode baseType)
Set the array's base type. |
java.util.List |
dims()
List of dimension expressions. |
NewArray |
dims(java.util.List dims)
Set the list of dimension expressions. |
ArrayInit |
init()
The array initializer, or null. |
NewArray |
init(ArrayInit init)
Set the array initializer. |
int |
numDims()
The number of array dimensions. |
Methods inherited from interface polyglot.ast.Expr |
constantValue, isConstant, precedence, printSubExpr, printSubExpr, type |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren |
Methods inherited from interface polyglot.util.Copy |
copy |
Methods inherited from interface polyglot.ast.Typed |
type |
Methods inherited from interface polyglot.ast.Term |
acceptCFG, entry, reachable, reachable |
Method Detail |
public TypeNode baseType()
public NewArray baseType(TypeNode baseType)
public int numDims()
public java.util.List dims()
Expr
.public NewArray dims(java.util.List dims)
dims
- A list of Expr
.public int additionalDims()
public NewArray additionalDims(int addDims)
public ArrayInit init()
public NewArray init(ArrayInit init)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |