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(@Nullable Object obj) |
Node |
getDimension(int i) |
List<Node> |
getDimensions() |
Node |
getInitializer(int i) |
List<Node> |
getInitializers() |
Collection<Node> |
getOperands()
|
@Nullable 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, getUid, isLValue, nodeCollectionToString, setAssignmentContext, setBlock, setInSource, setLValue, toStringDebug
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 @Nullable Tree getTree()
Node
Tree
in the abstract syntax tree, or null
if no corresponding
tree exists. For instance, this is the case for an ImplicitThisNode
.public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Node
public Collection<Node> getOperands()
Node
getOperands
in class Node
Node
s of this Node