koala.dynamicjava.tree
Class LabeledStatement

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

public class LabeledStatement
extends Statement

This class represents the labeled statement nodes of the syntax tree

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

Constructor Summary
LabeledStatement(java.lang.String label, Node stat)
          Creates a new while statement
LabeledStatement(java.lang.String label, Node stat, SourceInfo si)
          Creates a new while statement
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 java.lang.String getLabel()
          Gets the label
 Node getStatement()
          Returns the statement
 void setLabel(java.lang.String s)
          Sets the label
 void setStatement(Node n)
          Sets the statement
 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

LabeledStatement

public LabeledStatement(java.lang.String label,
                        Node stat)
Creates a new while statement

Parameters:
label - the label
stat - the statement
Throws:
java.lang.IllegalArgumentException - if label is null or stat is null

LabeledStatement

public LabeledStatement(java.lang.String label,
                        Node stat,
                        SourceInfo si)
Creates a new while statement

Parameters:
label - the label
stat - the statement
Throws:
java.lang.IllegalArgumentException - if label is null or stat is null
Method Detail

getLabel

public java.lang.String getLabel()
Gets the label


setLabel

public void setLabel(java.lang.String s)
Sets the label

Throws:
java.lang.IllegalArgumentException - if e is null

getStatement

public Node getStatement()
Returns the statement


setStatement

public void setStatement(Node n)
Sets the statement

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

Overrides:
toString in class java.lang.Object