koala.dynamicjava.tree
Class SynchronizedStatement

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

public class SynchronizedStatement
extends Statement

This class represents the synchronized statement nodes of the syntax tree

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

Constructor Summary
SynchronizedStatement(Expression lock, Node body, SourceInfo si)
          Creates a new while statement
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 Node getBody()
          Returns the body of this statement
 Expression getLock()
          Gets the lock object
 void setBody(Node node)
          Sets the body of this statement
 void setLock(Expression e)
          Sets the condition to evaluate
 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

SynchronizedStatement

public SynchronizedStatement(Expression lock,
                             Node body,
                             SourceInfo si)
Creates a new while statement

Parameters:
lock - the lock object
body - the body
Throws:
IllegalArgumentException - if lock is null or body is null
Method Detail

getLock

public Expression getLock()
Gets the lock object


setLock

public void setLock(Expression e)
Sets the condition to evaluate

Throws:
IllegalArgumentException - if e is null

getBody

public Node getBody()
Returns the body of this statement


setBody

public void setBody(Node node)
Sets the body of this statement

Throws:
IllegalArgumentException - if node 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