public interface NewArray extends Expr
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.Term.Instance
Modifier and Type | Method and Description |
---|---|
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<Expr> |
dims()
List of dimension expressions.
|
NewArray |
dims(java.util.List<Expr> 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.
|
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
exceptions, exceptions, reachable, reachable
TypeNode baseType()
int numDims()
NewArray dims(java.util.List<Expr> dims)
dims
- A list of Expr
.int additionalDims()
NewArray additionalDims(int addDims)
ArrayInit init()