|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--koala.dynamicjava.tree.Node
|
+--koala.dynamicjava.tree.Statement
|
+--koala.dynamicjava.tree.WhileStatement
This class represents the while statement nodes of the syntax tree
| Field Summary | |
static java.lang.String |
BODY
The body property name |
static java.lang.String |
CONDITION
The condition property name |
| Fields inherited from class koala.dynamicjava.tree.Node |
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME |
| Constructor Summary | |
WhileStatement(Expression cond,
Node body)
Creates a new while statement |
|
WhileStatement(Expression cond,
Node body,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new while statement |
|
| Method Summary | |
java.lang.Object |
acceptVisitor(Visitor visitor)
Allows a visitor to traverse the tree |
void |
addLabel(java.lang.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(java.lang.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 |
| Methods inherited from class koala.dynamicjava.tree.Node |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFilename, getProperties, getProperty, hasProperty, removePropertyChangeListener, removePropertyChangeListener, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setFilename, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONDITION
public static final java.lang.String BODY
| Constructor Detail |
public WhileStatement(Expression cond,
Node body)
cond - the condition to evaluate at each loopbody - the bodyjava.lang.IllegalArgumentException - if cond is null or body is null
public WhileStatement(Expression cond,
Node body,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
cond - the condition to evaluate at each loopbody - the bodyfn - the filenamebl - the begin linebc - the begin columnel - the end lineec - the end columnjava.lang.IllegalArgumentException - if cond is null or body is null| Method Detail |
public Expression getCondition()
public void setCondition(Expression e)
java.lang.IllegalArgumentException - if e is nullpublic Node getBody()
public void setBody(Node node)
java.lang.IllegalArgumentException - if node is nullpublic void addLabel(java.lang.String label)
addLabel in interface ContinueTargetlabel - the label to addjava.lang.IllegalArgumentException - if label is nullpublic boolean hasLabel(java.lang.String label)
hasLabel in interface ContinueTargetpublic java.lang.Object acceptVisitor(Visitor visitor)
acceptVisitor in class Nodevisitor - the visitor to accept
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||