org.inxar.jenesis
Interface NewArray

All Superinterfaces:
Codeable, Expression

public interface NewArray
extends Expression

Expression subinterface for expressions which create new arrays.


Method Summary
 NewArray addDim()
          Sets the given dimension without an argument ([]).
 NewArray addDim(Expression e)
          Sets the given expression for the given dimension.
 Iterator getDims()
          Gets the list of dimension expressions as an iterator of Expression.
 ArrayInitializer getInitializer()
          Gets the array initialization expression.
 void setInitializer(ArrayInitializer ai)
          Sets the array initialization expressions as an arbitrarily nested array[n] of expressions.
 void setType(Type type)
          Sets the given type for this array creation.
 
Methods inherited from interface org.inxar.jenesis.Expression
getType
 
Methods inherited from interface org.inxar.jenesis.Codeable
getComment, setComment, toCode, vm
 

Method Detail

setType

public void setType(Type type)
Sets the given type for this array creation. The Type should be a class or primitive type, not an array type.

getInitializer

public ArrayInitializer getInitializer()
Gets the array initialization expression.

setInitializer

public void setInitializer(ArrayInitializer ai)
Sets the array initialization expressions as an arbitrarily nested array[n] of expressions.

getDims

public Iterator getDims()
Gets the list of dimension expressions as an iterator of Expression.

addDim

public NewArray addDim(Expression e)
Sets the given expression for the given dimension. To specify a dimension without an argument, set the expr to null.

addDim

public NewArray addDim()
Sets the given dimension without an argument ([]).