org.codehaus.janino
Class Java.NewArray
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.Atom
org.codehaus.janino.Java.Rvalue
org.codehaus.janino.Java.NewArray
- All Implemented Interfaces:
- Java.ArrayInitializerOrRvalue, Java.Locatable
- Enclosing class:
- Java
public static final class Java.NewArray
- extends Java.Rvalue
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
type
public final Java.Type type
dimExprs
public final Java.Rvalue[] dimExprs
dims
public final int dims
Java.NewArray
public Java.NewArray(Location location,
Java.Type type,
Java.Rvalue[] dimExprs,
int dims)
- Create a new array with dimension dimExprs.length + 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
)
- Parameters:
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
toString
public java.lang.String toString()
- Specified by:
toString
in class Java.Atom
accept
public void accept(Visitor.AtomVisitor visitor)
- Specified by:
accept
in class Java.Atom
accept
public void accept(Visitor.RvalueVisitor visitor)
- Specified by:
accept
in class Java.Rvalue
Copyright © 2001-2011. All Rights Reserved.