
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,
List<JClassLiteral> classLits) |
| 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 |
getClassLiteral()
Return a class literal for the array type itself.
|
List<JClassLiteral> |
getClassLiterals()
Get the list of class literals that will be needed to support this
expression.
|
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.
|
makeStatementgetSourceInfo, setSourceInfo, toSource, toStringpublic final List<JExpression> dims
public final List<JExpression> initializers
public JNewArray(SourceInfo info, JArrayType type, List<JExpression> dims, List<JExpression> initializers, List<JClassLiteral> classLits)
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 getClassLiteral()
public List<JClassLiteral> getClassLiterals()
dims,
then the literals will be the array type, followed by the array's component
type, followed by array's component type's component type, etc.public JNonNullType getType()
HasTypepublic boolean hasSideEffects()
hasSideEffects in class JExpressionpublic void setType(JArrayType type)
public void traverse(JVisitor visitor, Context ctx)
JVisitablevisitor - the visitor that should traverse this nodectx - the context of an existing traversalCopyright © 2018. All rights reserved.