koala.dynamicjava.tree
Class IfThenElseStatement
java.lang.Object
|
+--koala.dynamicjava.tree.Node
|
+--koala.dynamicjava.tree.Statement
|
+--koala.dynamicjava.tree.IfThenStatement
|
+--koala.dynamicjava.tree.IfThenElseStatement
- public class IfThenElseStatement
- extends IfThenStatement
This class represents the if-then-else statement nodes of the syntax tree
|
Field Summary |
static java.lang.String |
ELSE_STATEMENT
The elseStatement property name |
| 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 |
ELSE_STATEMENT
public static final java.lang.String ELSE_STATEMENT
- The elseStatement property name
IfThenElseStatement
public IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt)
- Creates a new while statement
- Parameters:
cond - the conditiontstmt - the then statementestmt - the else statement- Throws:
java.lang.IllegalArgumentException - if cond is null or tstmt is null or
estmt is null
IfThenElseStatement
public IfThenElseStatement(Expression cond,
Node tstmt,
Node estmt,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
- Creates a new while statement
- Parameters:
cond - the conditiontstmt - the then statementestmt - the else statementfn - the filenamebl - the begin linebc - the begin columnel - the end lineec - the end column- Throws:
java.lang.IllegalArgumentException - if cond is null or tstmt is null or
estmt is null
getElseStatement
public Node getElseStatement()
- Returns the else statement of this statement
setElseStatement
public void setElseStatement(Node node)
- Sets the else statement of this statement
- Throws:
java.lang.IllegalArgumentException - if node is null
acceptVisitor
public java.lang.Object acceptVisitor(Visitor visitor)
- Allows a visitor to traverse the tree
- Overrides:
acceptVisitor in class IfThenStatement
- Parameters:
visitor - the visitor to accept
Copyright ? 2001 Stephane Hillion. All Rights Reserved.