|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkoala.dynamicjava.tree.Node
koala.dynamicjava.tree.Expression
koala.dynamicjava.tree.PrimaryExpression
koala.dynamicjava.tree.ArrayAllocation
public class ArrayAllocation
This class represents the array allocation nodes of the syntax tree
| Nested Class Summary | |
|---|---|
static class |
ArrayAllocation.TypeDescriptor
This class contains informations about the array to create |
| Constructor Summary | |
|---|---|
ArrayAllocation(TypeName tp,
ArrayAllocation.TypeDescriptor td)
Initializes the expression |
|
ArrayAllocation(TypeName tp,
ArrayAllocation.TypeDescriptor td,
SourceInfo si)
Initializes the expression |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
int |
getDimension()
Returns the dimension of the array |
|
TypeName |
getElementType()
Returns the creation type |
|
ArrayInitializer |
getInitialization()
Returns the initialization expression |
|
List<Expression> |
getSizes()
Returns the size expressions |
|
void |
setDimension(int dim)
Note: This method doesn't follow the usual convention of firing a property change. |
|
void |
setElementType(TypeName t)
Sets the creation type |
|
void |
setInitialization(ArrayInitializer init)
Note: This method doesn't follow the usual convention of firing a property change. |
|
void |
setSizes(List<? extends Expression> sz)
Note: This method doesn't follow the usual convention of firing a property change. |
|
String |
toString()
Implementation of toString for use in unit testing |
|
| Methods inherited from class koala.dynamicjava.tree.Node |
|---|
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayAllocation(TypeName tp,
ArrayAllocation.TypeDescriptor td)
tp - the type prefixtd - the type descriptor
IllegalArgumentException - if tp is null or td is null
public ArrayAllocation(TypeName tp,
ArrayAllocation.TypeDescriptor td,
SourceInfo si)
tp - the type prefixtd - the type descriptor. The element type of the enclosed initializer will
be automatically and recursively set.
IllegalArgumentException - if tp is null or td is null| Method Detail |
|---|
public TypeName getElementType()
public void setElementType(TypeName t)
IllegalArgumentException - if t is nullpublic int getDimension()
public void setDimension(int dim)
public List<Expression> getSizes()
public void setSizes(List<? extends Expression> sz)
public ArrayInitializer getInitialization()
public void setInitialization(ArrayInitializer init)
init - An initializer, assumed to already be set up with a valid element type.
(The ArrayInitializer constructor will set up the element type automatically,
but this method does not.)public <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||