org.objectweb.medor.expression.lib
Class BasicBinaryOperator

java.lang.Object
  extended byorg.objectweb.medor.clone.lib.BasicCloneable
      extended byorg.objectweb.medor.expression.lib.BasicExpression
          extended byorg.objectweb.medor.expression.lib.BasicOperator
              extended byorg.objectweb.medor.expression.lib.BasicBinaryOperator
All Implemented Interfaces:
BinaryOperator, org.objectweb.medor.clone.api.Cloneable, java.lang.Cloneable, Expression, Operator, java.io.Serializable
Direct Known Subclasses:
BasicBinaryArithmeticOperator, BasicBinaryLogicalOperator, BasicComparator, Concat, FirstLocate

public abstract class BasicBinaryOperator
extends BasicOperator
implements BinaryOperator

Author:
Sebastien Chassande-Barrioz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.medor.expression.lib.BasicOperator
expressions, result, verified
 
Fields inherited from class org.objectweb.medor.expression.lib.BasicExpression
logger, type
 
Fields inherited from interface org.objectweb.medor.expression.api.Operator
ABS, AND, AVG, BITWIZE, CONCAT, CONDAND, CONDOR, COUNT, DIV, EQUAL, FIRSTLOCATE, GREATER, GREATEREQUAL, IN, INDEXEDLOCATE, LENGTH, LOWER, LOWEREQUAL, MAX, MEMBEROF, MIN, MINUS, MOD, MULT, NAV, NOT, NOTEQUAL, NOTMEMBEROF, OR, PLUS, SQRT, STRING_LOWER, STRING_UPPER, SUBSTRING, SUM, UMINUS
 
Constructor Summary
BasicBinaryOperator()
           
BasicBinaryOperator(Expression e0, Expression e1)
           
BasicBinaryOperator(org.objectweb.jorm.type.api.PType type)
           
BasicBinaryOperator(org.objectweb.jorm.type.api.PType type, Expression e0, Expression e1)
           
 
Method Summary
 Expression getLeftExpression()
           
 Expression getRightExpression()
           
 void setLeftExpression(Expression leftChild)
          This method sets the left operand or operator to this expression object.
 void setRightExpression(Expression rightChild)
          This method sets the left operand or operator to this expression object.
 
Methods inherited from class org.objectweb.medor.expression.lib.BasicOperator
clone, getExpression, getOperandNumber, setExpression
 
Methods inherited from class org.objectweb.medor.expression.lib.BasicExpression
getType
 
Methods inherited from class org.objectweb.medor.clone.lib.BasicCloneable
clone, clone, getClone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.medor.expression.api.Operator
getExpression, getOperandNumber, getOperatorString, setExpression
 
Methods inherited from interface org.objectweb.medor.expression.api.Expression
compileExpression, evaluate, getType
 
Methods inherited from interface org.objectweb.medor.clone.api.Cloneable
clone
 

Constructor Detail

BasicBinaryOperator

public BasicBinaryOperator()

BasicBinaryOperator

public BasicBinaryOperator(Expression e0,
                           Expression e1)

BasicBinaryOperator

public BasicBinaryOperator(org.objectweb.jorm.type.api.PType type)

BasicBinaryOperator

public BasicBinaryOperator(org.objectweb.jorm.type.api.PType type,
                           Expression e0,
                           Expression e1)
Method Detail

setLeftExpression

public void setLeftExpression(Expression leftChild)
                       throws java.lang.IllegalStateException
Description copied from interface: BinaryOperator
This method sets the left operand or operator to this expression object. There is no verification of types when performing this method. After evaluating, we must compile this expression.

Specified by:
setLeftExpression in interface BinaryOperator
Throws:
java.lang.IllegalStateException

setRightExpression

public void setRightExpression(Expression rightChild)
                        throws java.lang.IllegalStateException
Description copied from interface: BinaryOperator
This method sets the left operand or operator to this expression object. There is no verification of types when performing this method. After evaluating, we must compile this expression.

Specified by:
setRightExpression in interface BinaryOperator
Throws:
java.lang.IllegalStateException

getLeftExpression

public Expression getLeftExpression()
Specified by:
getLeftExpression in interface BinaryOperator

getRightExpression

public Expression getRightExpression()
Specified by:
getRightExpression in interface BinaryOperator