koala.dynamicjava.tree
Class ConditionalExpression

java.lang.Object
  |
  +--koala.dynamicjava.tree.Node
        |
        +--koala.dynamicjava.tree.Expression
              |
              +--koala.dynamicjava.tree.ConditionalExpression

public class ConditionalExpression
extends Expression

This class represents the binary expression nodes of the syntax tree


Field Summary
static java.lang.String CONDITION_EXPRESSION
          The conditionExpression property name
static java.lang.String IF_FALSE_EXPRESSION
          The ifFalseExpression property name
static java.lang.String IF_TRUE_EXPRESSION
          The ifTrueExpression property name
 
Fields inherited from class koala.dynamicjava.tree.Node
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME
 
Constructor Summary
ConditionalExpression(Expression cexp, Expression texp, Expression fexp)
          Initializes the expression
ConditionalExpression(Expression cexp, Expression texp, Expression fexp, java.lang.String fn, int bl, int bc, int el, int ec)
          Initializes the expression
 
Method Summary
 java.lang.Object acceptVisitor(Visitor visitor)
          Allows a visitor to traverse the tree
 Expression getConditionExpression()
          Returns the condition expression
 Expression getIfFalseExpression()
          Returns the if false expression
 Expression getIfTrueExpression()
          Returns the if true expression
 void setConditionExpression(Expression e)
          Sets the condition expression
 void setIfFalseExpression(Expression e)
          Sets the if false expression
 void setIfTrueExpression(Expression e)
          Sets the if true expression
 
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

CONDITION_EXPRESSION

public static final java.lang.String CONDITION_EXPRESSION
The conditionExpression property name

IF_TRUE_EXPRESSION

public static final java.lang.String IF_TRUE_EXPRESSION
The ifTrueExpression property name

IF_FALSE_EXPRESSION

public static final java.lang.String IF_FALSE_EXPRESSION
The ifFalseExpression property name
Constructor Detail

ConditionalExpression

public ConditionalExpression(Expression cexp,
                             Expression texp,
                             Expression fexp)
Initializes the expression
Parameters:
cexp - the condition expression
texp - the if true expression
fexp - the if false expression
Throws:
java.lang.IllegalArgumentException - if cexp is null or texp is null or fexp is null

ConditionalExpression

public ConditionalExpression(Expression cexp,
                             Expression texp,
                             Expression fexp,
                             java.lang.String fn,
                             int bl,
                             int bc,
                             int el,
                             int ec)
Initializes the expression
Parameters:
cexp - the condition expression
texp - the if true expression
fexp - the if false expression
fn - the filename
bl - the begin line
bc - the begin column
el - the end line
ec - the end column
Throws:
java.lang.IllegalArgumentException - if cexp is null or texp is null or fexp is null
Method Detail

getConditionExpression

public Expression getConditionExpression()
Returns the condition expression

setConditionExpression

public void setConditionExpression(Expression e)
Sets the condition expression
Throws:
java.lang.IllegalArgumentException - if e is null

getIfTrueExpression

public Expression getIfTrueExpression()
Returns the if true expression

setIfTrueExpression

public void setIfTrueExpression(Expression e)
Sets the if true expression
Throws:
java.lang.IllegalArgumentException - if e is null

getIfFalseExpression

public Expression getIfFalseExpression()
Returns the if false expression

setIfFalseExpression

public void setIfFalseExpression(Expression e)
Sets the if false expression
Throws:
java.lang.IllegalArgumentException - if e is null

acceptVisitor

public java.lang.Object acceptVisitor(Visitor visitor)
Allows a visitor to traverse the tree
Overrides:
acceptVisitor in class Node
Parameters:
visitor - the visitor to accept


Copyright © 2001 Stephane Hillion. All Rights Reserved.