public class JNewArray extends JExpression
Constructor and Description |
---|
JNewArray(SourceInfo info,
JArrayType type,
List<JExpression> dimensionExpressions,
List<JExpression> initializers,
JClassLiteral leafTypeClassLiteral) |
Modifier and Type | Method and Description |
---|---|
static JNewArray |
createArrayWithDimensionExpressions(SourceInfo info,
JArrayType arrayType,
List<JExpression> dimensionExpressions) |
static JNewArray |
createArrayWithInitializers(SourceInfo info,
JArrayType arrayType,
List<JExpression> initializers) |
JArrayType |
getArrayType() |
List<JExpression> |
getDimensionExpressions() |
List<JExpression> |
getInitializers() |
JClassLiteral |
getLeafTypeClassLiteral()
Return a class literal for the leaf type of the array.
|
JReferenceType |
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.
|
makeReturnStatement, makeStatement
getSourceInfo, setSourceInfo, toSource, toString
public JNewArray(SourceInfo info, JArrayType type, List<JExpression> dimensionExpressions, List<JExpression> initializers, JClassLiteral leafTypeClassLiteral)
public static JNewArray createArrayWithDimensionExpressions(SourceInfo info, JArrayType arrayType, List<JExpression> dimensionExpressions)
public static JNewArray createArrayWithInitializers(SourceInfo info, JArrayType arrayType, List<JExpression> initializers)
public JArrayType getArrayType()
public List<JExpression> getDimensionExpressions()
public List<JExpression> getInitializers()
public JClassLiteral getLeafTypeClassLiteral()
public JReferenceType getType()
HasType
public boolean hasSideEffects()
hasSideEffects
in class JExpression
public void setType(JArrayType type)
Copyright © 2018. All rights reserved.