koala.dynamicjava.tree
Class AnonymousInnerAllocation

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Expression
          extended by koala.dynamicjava.tree.PrimaryExpression
              extended by koala.dynamicjava.tree.InnerAllocation
                  extended by koala.dynamicjava.tree.AnonymousInnerAllocation
All Implemented Interfaces:
ExpressionContainer, SourceInfo.Wrapper, StatementExpression

public class AnonymousInnerAllocation
extends InnerAllocation

This class represents the anonymous allocation nodes that extend an inner class. Nodes are derived from syntax like "a.makeOuter().new Foo(x, y+3, z.method()) { void bar() {} }"

Version:
1.0 - 1999/05/25
Author:
Stephane Hillion

Field Summary
static java.lang.String MEMBERS
          The members property name
 
Fields inherited from interface koala.dynamicjava.tree.ExpressionContainer
EXPRESSION
 
Constructor Summary
AnonymousInnerAllocation(Expression exp, Option<java.util.List<TypeName>> targs, java.lang.String cn, Option<java.util.List<TypeName>> ctargs, java.util.List<? extends Expression> args, java.util.List<Node> memb)
          Initializes the expression
AnonymousInnerAllocation(Expression exp, Option<java.util.List<TypeName>> targs, java.lang.String cn, Option<java.util.List<TypeName>> ctargs, java.util.List<? extends Expression> args, java.util.List<Node> memb, SourceInfo si)
          Initializes the expression
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 java.util.List<Node> getMembers()
          Returns the members of the anonymous class
 void setMembers(java.util.List<Node> l)
          Sets the members of the anonymous class
 java.lang.String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.InnerAllocation
getArguments, getClassName, getClassTypeArgs, getExpression, getTypeArgs, setArguments, setClassName, setClassTypeArgs, setClassTypeArgs, setExpression, setTypeArgs, setTypeArgs
 
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
 

Field Detail

MEMBERS

public static final java.lang.String MEMBERS
The members property name

See Also:
Constant Field Values
Constructor Detail

AnonymousInnerAllocation

public AnonymousInnerAllocation(Expression exp,
                                Option<java.util.List<TypeName>> targs,
                                java.lang.String cn,
                                Option<java.util.List<TypeName>> ctargs,
                                java.util.List<? extends Expression> args,
                                java.util.List<Node> memb)
Initializes the expression

Parameters:
exp - the outer object
targs - constructor type arguments
cn - the inner class name
ctargs - class type arguments
args - the arguments of the constructor. Can be null.
memb - the members of the class

AnonymousInnerAllocation

public AnonymousInnerAllocation(Expression exp,
                                Option<java.util.List<TypeName>> targs,
                                java.lang.String cn,
                                Option<java.util.List<TypeName>> ctargs,
                                java.util.List<? extends Expression> args,
                                java.util.List<Node> memb,
                                SourceInfo si)
Initializes the expression

Parameters:
exp - the outer object
targs - constructor type arguments
cn - the inner class name
ctargs - class type arguments
args - the arguments of the constructor. Can be null.
memb - the members of the class
Method Detail

getMembers

public java.util.List<Node> getMembers()
Returns the members of the anonymous class


setMembers

public void setMembers(java.util.List<Node> l)
Sets the members of the anonymous class

Throws:
java.lang.IllegalArgumentException - if l is null

acceptVisitor

public <T> T acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree

Overrides:
acceptVisitor in class InnerAllocation
Parameters:
visitor - the visitor to accept

toString

public java.lang.String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class InnerAllocation