org.teatrove.tea.parsetree
Class ExpressionStatement

java.lang.Object
  extended by org.teatrove.tea.parsetree.Node
      extended by org.teatrove.tea.parsetree.Statement
          extended by org.teatrove.tea.parsetree.ExpressionStatement
All Implemented Interfaces:
Serializable, Cloneable

public class ExpressionStatement
extends Statement

An ExpressionStatement allows an Expression to be converted to a Statement. What happens to the value returned by the Expression is determined by a code generator.

Author:
Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
ExpressionStatement(Expression expr)
           
 
Method Summary
 Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 Object clone()
          Returns a clone of this Node and all its children.
 Expression getExpression()
           
 Method getReceiverMethod()
           
 void setExpression(Expression expr)
           
 void setReceiverMethod(Method m)
           
 
Methods inherited from class org.teatrove.tea.parsetree.Statement
isBreak, isReturn
 
Methods inherited from class org.teatrove.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionStatement

public ExpressionStatement(Expression expr)
Method Detail

accept

public Object accept(NodeVisitor visitor)
Description copied from class: Node
Every subclass of Node must override this method with the following: return visitor.visit(this).

Overrides:
accept in class Statement
Parameters:
visitor - A visitor of this Node
Returns:
Node The Node returned by the visitor
See Also:
NodeVisitor

clone

public Object clone()
Description copied from class: Node
Returns a clone of this Node and all its children. Immutable child objects are not necessarily cloned

Overrides:
clone in class Node

getExpression

public Expression getExpression()

getReceiverMethod

public Method getReceiverMethod()

setExpression

public void setExpression(Expression expr)

setReceiverMethod

public void setReceiverMethod(Method m)


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.