|
|||||||||||
| 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.ForStatement
This class represents the for 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 |
static java.lang.String |
INITIALIZATION
The initialization property name |
static java.lang.String |
UPDATE
The update property name |
| Fields inherited from class koala.dynamicjava.tree.Node |
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME |
| Constructor Summary | |
ForStatement(java.util.List init,
Expression cond,
java.util.List updt,
Node body)
Creates a new for statement |
|
ForStatement(java.util.List init,
Expression cond,
java.util.List updt,
Node body,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new for 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 |
java.util.List |
getInitialization()
Gets the initialization statements |
java.util.List |
getUpdate()
Gets the update statements |
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 |
void |
setInitialization(java.util.List l)
Sets the initialization statements |
void |
setUpdate(java.util.List l)
Sets the update statements |
| 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 INITIALIZATION
public static final java.lang.String CONDITION
public static final java.lang.String UPDATE
public static final java.lang.String BODY
| Constructor Detail |
public ForStatement(java.util.List init,
Expression cond,
java.util.List updt,
Node body)
init - the initialization statementscond - the condition to evaluate at each loopupdt - the update statementsbody - the body
java.lang.IllegalArgumentException - if body is null
public ForStatement(java.util.List init,
Expression cond,
java.util.List updt,
Node body,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
init - the initialization statementscond - the condition to evaluate at each loopupdt - the update statementsbody - the bodyfn - the filenamebl - the begin linebc - the begin columnel - the end lineec - the end column
java.lang.IllegalArgumentException - if body is null| Method Detail |
public java.util.List getInitialization()
public void setInitialization(java.util.List l)
public Expression getCondition()
public void setCondition(Expression e)
public java.util.List getUpdate()
public void setUpdate(java.util.List l)
public 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 add
java.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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||