koala.dynamicjava.tree
Class TryStatement

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

public class TryStatement
extends Statement

This class represents the try statement nodes of the syntax tree

Version:
1.0 - 1999/05/26
Author:
Stephane Hillion

Constructor Summary
TryStatement(Node tryB, java.util.List<CatchStatement> catchL, Node fin, SourceInfo si)
          Creates a new while statement
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 java.util.List<CatchStatement> getCatchStatements()
          Gets the catch statements
 Node getFinallyBlock()
          Gets the finally block
 Node getTryBlock()
          Gets the try block
 java.lang.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

TryStatement

public TryStatement(Node tryB,
                    java.util.List<CatchStatement> catchL,
                    Node fin,
                    SourceInfo si)
Creates a new while statement

Parameters:
tryB - the try block
catchL - the catch list
fin - the finally block
Method Detail

getTryBlock

public Node getTryBlock()
Gets the try block


getCatchStatements

public java.util.List<CatchStatement> getCatchStatements()
Gets the catch statements


getFinallyBlock

public Node getFinallyBlock()
Gets the finally block


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

Overrides:
toString in class java.lang.Object