org.teatrove.tea.parsetree
Class StatementList

java.lang.Object
  extended by org.teatrove.tea.parsetree.Node
      extended by org.teatrove.tea.parsetree.Statement
          extended by org.teatrove.tea.parsetree.StatementList
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Block

public class StatementList
extends Statement

A StatementList wraps a list of statements as if they were a single statement.

Author:
Brian S O'Neill
See Also:
Block, Template.getStatement(), Serialized Form

Constructor Summary
StatementList(SourceInfo info, Statement[] statements)
           
 
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.
 Statement[] getStatements()
           
 boolean isReturn()
          Returns true if Statement definitely returns from its method either from a return statement or a throw statement.
 void setStatements(Statement[] stmts)
           
 
Methods inherited from class org.teatrove.tea.parsetree.Statement
isBreak
 
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

StatementList

public StatementList(SourceInfo info,
                     Statement[] statements)
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

isReturn

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

Overrides:
isReturn in class Statement

getStatements

public Statement[] getStatements()

setStatements

public void setStatements(Statement[] stmts)


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