koala.dynamicjava.tree
Class BinaryExpression

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Expression
          extended by koala.dynamicjava.tree.BinaryExpression
All Implemented Interfaces:
SourceInfo.Wrapper
Direct Known Subclasses:
AddExpression, AndExpression, AssignExpression, BitAndExpression, BitOrExpression, DivideExpression, EqualExpression, ExclusiveOrExpression, GreaterExpression, GreaterOrEqualExpression, LessExpression, LessOrEqualExpression, MultiplyExpression, NotEqualExpression, OrExpression, RemainderExpression, ShiftLeftExpression, ShiftRightExpression, SubtractExpression, UnsignedShiftRightExpression

public abstract class BinaryExpression
extends Expression

This class represents the binary expression nodes of the syntax tree

Version:
1.0 - 1999/04/25
Author:
Stephane Hillion

Constructor Summary
protected BinaryExpression(Expression lexp, Expression rexp, SourceInfo si)
          Initializes the expression
 
Method Summary
 Expression getLeftExpression()
          Returns the left hand side expression
 Expression getRightExpression()
          Returns the right hand side expression
 void setLeftExpression(Expression exp)
          Sets the left hand side expression
 void setRightExpression(Expression exp)
          Sets the right hand side expression
 String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.Node
acceptVisitor, 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

BinaryExpression

protected BinaryExpression(Expression lexp,
                           Expression rexp,
                           SourceInfo si)
Initializes the expression

Parameters:
lexp - the LHS expression
rexp - the RHS expression
Throws:
IllegalArgumentException - if lexp is null or rexp is null
Method Detail

getLeftExpression

public Expression getLeftExpression()
Returns the left hand side expression


setLeftExpression

public void setLeftExpression(Expression exp)
Sets the left hand side expression

Throws:
IllegalArgumentException - if exp is null

getRightExpression

public Expression getRightExpression()
Returns the right hand side expression


setRightExpression

public void setRightExpression(Expression exp)
Sets the right hand side expression

Throws:
IllegalArgumentException - if exp is null

toString

public String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class Object