|
||||||||||
| 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.IfThenStatement
koala.dynamicjava.tree.IfThenElseStatement
public class IfThenElseStatement
This class represents the if-then-else statement nodes of the syntax tree
| Constructor Summary | |
|---|---|
IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt)
Creates a new while statement |
|
IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt,
SourceInfo si)
Creates a new while statement |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
Node |
getElseStatement()
Returns the else statement of this statement |
|
void |
setElseStatement(Node node)
Sets the else statement of this statement |
|
java.lang.String |
toString()
Implementation of toString for use in unit testing |
|
| Methods inherited from class koala.dynamicjava.tree.IfThenStatement |
|---|
getCondition, getThenStatement, setCondition, setThenStatement |
| 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 IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt)
cond - the conditiontstmt - the then statementestmt - the else statement
java.lang.IllegalArgumentException - if cond is null or tstmt is null or
estmt is null
public IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt,
SourceInfo si)
cond - the conditiontstmt - the then statementestmt - the else statement
java.lang.IllegalArgumentException - if cond is null or tstmt is null or
estmt is null| Method Detail |
|---|
public Node getElseStatement()
public void setElseStatement(Node node)
java.lang.IllegalArgumentException - if node is nullpublic <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class IfThenStatementvisitor - the visitor to acceptpublic java.lang.String toString()
toString in class IfThenStatement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||