koala.dynamicjava.tree
Class BlockStatement

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

public class BlockStatement
extends Statement

This class represents the block statement nodes of the syntax tree

Version:
1.0 - 1999/04/30
Author:
Stephane Hillion

Constructor Summary
BlockStatement(List<Node> stmts)
          Creates a new block statement
BlockStatement(List<Node> stmts, SourceInfo si)
          Creates a new block statement
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 List<Node> getStatements()
          Returns the statements contained in this block
 void setStatements(List<Node> l)
          Sets the statements contained in this block
 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

BlockStatement

public BlockStatement(List<Node> stmts)
Creates a new block statement

Parameters:
stmts - the list of the statements contained in this block

BlockStatement

public BlockStatement(List<Node> stmts,
                      SourceInfo si)
Creates a new block statement

Parameters:
stmts - the list of the statements contained in this block
Throws:
IllegalArgumentException - if stmts is null
Method Detail

getStatements

public List<Node> getStatements()
Returns the statements contained in this block


setStatements

public void setStatements(List<Node> l)
Sets the statements contained in this block

Throws:
IllegalArgumentException - if l is null

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

Overrides:
toString in class Object