public static final class Java.NewArray extends Java.Rvalue
Modifier and Type | Field and Description |
---|---|
Java.Rvalue[] |
dimExprs |
int |
dims |
Java.Type |
type |
CONSTANT_VALUE_NULL, JUMP_IF_FALSE, JUMP_IF_TRUE
NOWHERE
Constructor and Description |
---|
Java.NewArray(Location location,
Java.Type type,
Java.Rvalue[] dimExprs,
int dims)
Create a new array with dimension dimExprs.length + dims
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor.AtomVisitor visitor) |
void |
accept(Visitor.RvalueVisitor visitor) |
String |
toString() |
getEnclosingBlockStatement, setEnclosingBlockStatement, toRvalue
toLvalue, toLvalueOrPE, toRvalueOrPE, toType, toTypeOrPE
getLocation, throwCompileException
public final Java.Type type
public final Java.Rvalue[] dimExprs
public final int dims
public Java.NewArray(Location location, Java.Type type, Java.Rvalue[] dimExprs, int dims)
e.g. byte[12][][] is created with new NewArray( null, Java.BasicType(NULL, Java.BasicType.BYTE), new Rvalue[] { new Java.Literal(null, Integer.valueOf(12) }, 2 )
location
- the location of this elementtype
- the base type of the arraydimExprs
- sizes for dimensions being allocated with specific sizesdims
- the number of dimensions that are not yet allocatedpublic void accept(Visitor.AtomVisitor visitor)
public void accept(Visitor.RvalueVisitor visitor)
accept
in class Java.Rvalue
Copyright © 2001–2013. All rights reserved.