public class ArrayCreationNode extends Node
new type [1][2] new type [] = { expr1, expr2, ... }
Modifier and Type | Field and Description |
---|---|
protected List<Node> |
dimensions
The length of this list is the number of dimensions in the array.
|
protected List<Node> |
initializers |
protected @Nullable NewArrayTree |
tree
The tree is null when an array is created for variable arity method calls.
|
Constructor and Description |
---|
ArrayCreationNode(@Nullable NewArrayTree tree,
TypeMirror type,
List<Node> dimensions,
List<Node> initializers) |
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(NodeVisitor<R,P> visitor,
P p)
Accept method of the visitor pattern.
|
boolean |
equals(Object obj) |
Node |
getDimension(int i) |
List<Node> |
getDimensions() |
Node |
getInitializer(int i) |
List<Node> |
getInitializers() |
Collection<Node> |
getOperands() |
Tree |
getTree()
Returns the
Tree in the abstract syntax tree, or null if no corresponding
tree exists. |
int |
hashCode() |
String |
toString() |
getAssignmentContext, getBlock, getInSource, getTransitiveOperands, getType, isLValue, setAssignmentContext, setBlock, setInSource, setLValue
protected final @Nullable NewArrayTree tree
protected final List<Node> dimensions
public ArrayCreationNode(@Nullable NewArrayTree tree, TypeMirror type, List<Node> dimensions, List<Node> initializers)
public Node getDimension(int i)
public Node getInitializer(int i)
public Tree getTree()
Node
Tree
in the abstract syntax tree, or null
if no corresponding
tree exists. For instance, this is the case for an ImplicitThisLiteralNode
.public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Node
public Collection<Node> getOperands()
getOperands
in class Node
Node
s of this Node
.