public class JNewArray extends JExpression
Modifier and Type | Field and Description |
---|---|
List<JExpression> |
dims |
List<JExpression> |
initializers |
Constructor and Description |
---|
JNewArray(SourceInfo info,
JArrayType type,
List<JExpression> dims,
List<JExpression> initializers,
JClassLiteral leafTypeClassLiteral) |
Modifier and Type | Method and Description |
---|---|
static JNewArray |
createDims(SourceInfo info,
JArrayType arrayType,
List<JExpression> dims) |
static JNewArray |
createInitializers(SourceInfo info,
JArrayType arrayType,
List<JExpression> initializers) |
JArrayType |
getArrayType() |
JClassLiteral |
getLeafTypeClassLiteral()
Return a class literal for the leaf type of the array.
|
JNonNullType |
getType()
Returns the type of this expression.
|
boolean |
hasSideEffects() |
void |
setType(JArrayType type) |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
makeStatement
getSourceInfo, setSourceInfo, toSource, toString
public final List<JExpression> dims
public final List<JExpression> initializers
public JNewArray(SourceInfo info, JArrayType type, List<JExpression> dims, List<JExpression> initializers, JClassLiteral leafTypeClassLiteral)
public static JNewArray createDims(SourceInfo info, JArrayType arrayType, List<JExpression> dims)
public static JNewArray createInitializers(SourceInfo info, JArrayType arrayType, List<JExpression> initializers)
public JArrayType getArrayType()
public JClassLiteral getLeafTypeClassLiteral()
public JNonNullType getType()
HasType
public boolean hasSideEffects()
hasSideEffects
in class JExpression
public void setType(JArrayType type)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.