public static final class Java.NewArray extends Java.Rvalue
Modifier and Type | Field and Description |
---|---|
Java.Rvalue[] |
dimExprs
The sizes of the first dimensions to instantiate.
|
int |
dims
The count of additional dimensions that the array should have.
|
Java.Type |
type
|
NOWHERE
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)
Invokes the '
visit...() ' method of Visitor.ElementValueVisitor for the concrete Java.ElementValue type. |
void |
accept(Visitor.RvalueVisitor visitor)
|
String |
toString() |
getEnclosingBlockStatement, setEnclosingBlockStatement, toRvalue
toLvalue, toLvalueOrCompileException, toRvalueOrCompileException, toType, toTypeOrCompileException
getLocation, throwCompileException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocation, throwCompileException
public 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)
Java.Atom
public void accept(Visitor.RvalueVisitor visitor)
Java.Rvalue
accept
in class Java.Rvalue
public void accept(Visitor.ElementValueVisitor visitor)
Java.ElementValue
visit...()
' method of Visitor.ElementValueVisitor
for the concrete Java.ElementValue
type.Copyright © 2001–2016. All rights reserved.