koala.dynamicjava.tree
Class ReturnStatement

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Statement
          extended by koala.dynamicjava.tree.ReturnStatement
All Implemented Interfaces:
ExpressionContainer, SourceInfo.Wrapper

public class ReturnStatement
extends Statement
implements ExpressionContainer

This class represents the return statement nodes of the syntax tree

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

Field Summary
 
Fields inherited from interface koala.dynamicjava.tree.ExpressionContainer
EXPRESSION
 
Constructor Summary
ReturnStatement(Expression exp)
          Creates a new while statement
ReturnStatement(Expression exp, SourceInfo si)
          Creates a new while statement
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 Expression getExpression()
          Gets the expression
 void setExpression(Expression e)
          Sets the expression
 java.lang.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

ReturnStatement

public ReturnStatement(Expression exp)
Creates a new while statement

Parameters:
exp - the expression
Throws:
java.lang.IllegalArgumentException - if exp is null

ReturnStatement

public ReturnStatement(Expression exp,
                       SourceInfo si)
Creates a new while statement

Parameters:
exp - the expression
Method Detail

getExpression

public Expression getExpression()
Gets the expression

Specified by:
getExpression in interface ExpressionContainer

setExpression

public void setExpression(Expression e)
Sets the expression

Specified by:
setExpression in interface ExpressionContainer

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 java.lang.String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class java.lang.Object