|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkoala.dynamicjava.tree.Node
koala.dynamicjava.tree.Statement
koala.dynamicjava.tree.DoStatement
public class DoStatement
This class represents the do statement nodes of the syntax tree
| Constructor Summary | |
|---|---|
DoStatement(Expression cond,
Node body)
Creates a new do statement |
|
DoStatement(Expression cond,
Node body,
SourceInfo si)
Creates a new do statement |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
void |
addLabel(String label)
Adds a label to this statement |
|
Node |
getBody()
Returns the body of this statement |
|
Expression |
getCondition()
Gets the condition to evaluate at each loop |
|
boolean |
hasLabel(String label)
Test whether this statement has the given label |
|
void |
setBody(Node node)
Sets the body of this statement |
|
void |
setCondition(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 |
|---|
public DoStatement(Expression cond,
Node body)
cond - the condition to evaluate at each loopbody - the body
IllegalArgumentException - if cond is null or body is null
public DoStatement(Expression cond,
Node body,
SourceInfo si)
cond - the condition to evaluate at each loopbody - the body
IllegalArgumentException - if cond is null or body is null| Method Detail |
|---|
public Expression getCondition()
public void setCondition(Expression e)
IllegalArgumentException - if e is nullpublic Node getBody()
public void setBody(Node node)
IllegalArgumentException - if node is nullpublic void addLabel(String label)
addLabel in interface ContinueTargetlabel - the label to add
IllegalArgumentException - if label is nullpublic boolean hasLabel(String label)
hasLabel in interface ContinueTargetpublic <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||