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, toRvaluetoLvalue, toLvalueOrCompileException, toRvalueOrCompileException, toType, toTypeOrCompileExceptiongetLocation, throwCompileExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocation, 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)
Java.Atompublic void accept(Visitor.RvalueVisitor visitor)
Java.Rvalueaccept in class Java.Rvaluepublic void accept(Visitor.ElementValueVisitor visitor)
Java.ElementValuevisit...()' method of Visitor.ElementValueVisitor for the concrete Java.ElementValue type.Copyright © 2001–2025. All rights reserved.