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)
Creates a new array with dimension dimExprs
.length + dims. |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(Visitor.RvalueVisitor<R,EX> visitor)
|
String |
toString() |
accept, accept, getEnclosingScope, getEnclosingScopeOrNull, setEnclosingScope, 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)
.length + dims.
E.g. byte[12][][] is created with
new NewArray(
null,
Java.PrimitiveType(NULL, Java.PrimitiveType.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 allocated@Nullable public <R,EX extends Throwable> R accept(Visitor.RvalueVisitor<R,EX> visitor) throws EX extends Throwable
Java.Rvalueaccept in class Java.RvalueEX extends ThrowableCopyright © 2019. All rights reserved.