com.go.tea.parsetree
Class Statement

java.lang.Object
  |
  +--com.go.tea.parsetree.Node
        |
        +--com.go.tea.parsetree.Statement
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
AssignmentStatement, BreakStatement, ExceptionGuardStatement, ExpressionStatement, ForeachStatement, IfStatement, ReturnStatement, StatementList, SubstitutionStatement

public class Statement
extends Node

A Statement represents a stand-alone unit of code. The default Statement implements the empty statement, represented by a semi-colon ';' in a source file. A Parser usually strips most empty statements out.

Version:
22 , 5/31/01
Author:
Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
Statement(SourceInfo info)
           
 
Method Summary
 java.lang.Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 boolean isBreak()
          Returns true if Statement 'breaks' during its execution.
 boolean isReturn()
          Returns true if Statement definitely returns from its method either from a return statement or a throw statement.
 
Methods inherited from class com.go.tea.parsetree.Node
clone, getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Statement

public Statement(SourceInfo info)
Method Detail

accept

public java.lang.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 Node
Following copied from class: com.go.tea.parsetree.Node
Parameters:
visitor - A visitor of this Node
Returns:
Node The Node returned by the visitor
See Also:
NodeVisitor

isReturn

public boolean isReturn()
Returns true if Statement definitely returns from its method either from a return statement or a throw statement.

isBreak

public boolean isBreak()
Returns true if Statement 'breaks' during its execution.