public static final class Java.NewArray extends Java.Rvalue
| Modifier and Type | Field and Description |
|---|---|
Java.Rvalue[] |
dimExprs |
int |
dims |
Java.Type |
type |
JUMP_IF_FALSE, JUMP_IF_TRUENOWHERE| Constructor and Description |
|---|
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.ElementValueVisitor visitor) |
void |
accept(Visitor.RvalueVisitor visitor) |
java.lang.String |
toString() |
getEnclosingBlockStatement, setEnclosingBlockStatement, toRvaluetoLvalue, toLvalueOrCompileException, toRvalueOrCompileException, toType, toTypeOrCompileExceptiongetLocation, throwCompileExceptionpublic final Java.Type type
public final Java.Rvalue[] dimExprs
public final int dims
public 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.Rvaluepublic void accept(Visitor.ElementValueVisitor visitor)