org.teatrove.tea.parsetree
Class Statement
java.lang.Object
org.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Statement
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- AssignmentStatement, BreakStatement, ContinueStatement, 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.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
|
Method Summary |
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. |
Statement
public Statement(SourceInfo info)
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).
- Specified by:
accept in class 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.
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.