koala.dynamicjava.tree
Class ConstructorCall

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.ConstructorCall
All Implemented Interfaces:
ExpressionContainer, SourceInfo.Wrapper, StatementExpression

public class ConstructorCall
extends PrimaryExpression
implements ExpressionContainer, StatementExpression

This class represents the constructor call nodes of the syntax tree

Version:
1.0 - 1999/04/24
Author:
Stephane Hillion

Field Summary
 
Fields inherited from interface koala.dynamicjava.tree.ExpressionContainer
EXPRESSION
 
Constructor Summary
ConstructorCall(Expression exp, List<? extends Expression> args, boolean sup)
          Creates a new node
ConstructorCall(Expression exp, List<? extends Expression> args, boolean sup, SourceInfo si)
          Creates a new node
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 List<Expression> getArguments()
          Returns the arguments
 Expression getExpression()
          Returns the prefix expression if one, or null otherwise
 boolean isSuper()
          Returns true is this invocation is a 'super' or a 'this' invocation
 void setArguments(List<? extends Expression> l)
          Sets the arguments
 void setExpression(Expression e)
          Sets the prefix expression
 void setSuper(boolean b)
          Sets the super property
 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

ConstructorCall

public ConstructorCall(Expression exp,
                       List<? extends Expression> args,
                       boolean sup)
Creates a new node

Parameters:
exp - the prefix expression
args - the arguments. null if there are no argument.
sup - whether this invocation is 'super' or 'this'

ConstructorCall

public ConstructorCall(Expression exp,
                       List<? extends Expression> args,
                       boolean sup,
                       SourceInfo si)
Creates a new node

Parameters:
exp - the prefix expression
args - the arguments. null if there are no argument.
sup - whether this invocation is 'super' or 'this'
Method Detail

getExpression

public Expression getExpression()
Returns the prefix expression if one, or null otherwise

Specified by:
getExpression in interface ExpressionContainer

setExpression

public void setExpression(Expression e)
Sets the prefix expression

Specified by:
setExpression in interface ExpressionContainer

getArguments

public List<Expression> getArguments()
Returns the arguments


setArguments

public void setArguments(List<? extends Expression> l)
Sets the arguments


isSuper

public boolean isSuper()
Returns true is this invocation is a 'super' or a 'this' invocation


setSuper

public void setSuper(boolean b)
Sets the super property


acceptVisitor

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

Specified by:
acceptVisitor in class Node
Parameters:
visitor - the visitor to accept

toString

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

Overrides:
toString in class Object