jeops.expressions
Class BinaryJavaExpr

java.lang.Object
  |
  +--jeops.expressions.JavaExpr
        |
        +--jeops.expressions.BinaryJavaExpr

public class BinaryJavaExpr
extends JavaExpr

This class models a binary expression of (our subset of) the java language. The unary expressions currently supported are:

Version:
0.01 02 Mar 1999
Author:
Carlos Figueira Filho (csff@di.ufpe.br)

Field Summary
static int DIV
          Constant used to indicate that this expression represents a division.
static int EQ
          Constant used to indicate that this expression represents an equality comparison.
static int GEQ
          Constant used to indicate that this expression represents a greater than or equals comparison.
static int GT
          Constant used to indicate that this expression represents a greater than comparison.
static int LAND
          Constant used to indicate that this expression represents a logical AND.
static int LEQ
          Constant used to indicate that this expression represents a less than or equals comparison.
static int LOR
          Constant used to indicate that this expression represents a logical OR.
static int LT
          Constant used to indicate that this expression represents a less than comparison.
static int MUL
          Constant used to indicate that this expression represents a multiplication.
static int NEQ
          Constant used to indicate that this expression represents an inequality comparison.
static int SUB
          Constant used to indicate that this expression represents a subtraction.
static int SUM
          Constant used to indicate that this expression represents a sum.
 
Fields inherited from class jeops.expressions.JavaExpr
BOOL, INT, OBJ
 
Constructor Summary
BinaryJavaExpr(JavaExpr left, JavaExpr right, int binaryType)
          Class constructor.
 
Method Summary
 void dump(int spaces)
          Prints the tree of this expression with the given identation.
 java.lang.Class getClasse()
          Returns an object representing the class of this expression.
 
Methods inherited from class jeops.expressions.JavaExpr
dump, evaluateBool, evaluateInt, evaluateObj, identObjetos, numIdentObjetos, tipo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOR

public static final int LOR
Constant used to indicate that this expression represents a logical OR.

LAND

public static final int LAND
Constant used to indicate that this expression represents a logical AND.

EQ

public static final int EQ
Constant used to indicate that this expression represents an equality comparison.

NEQ

public static final int NEQ
Constant used to indicate that this expression represents an inequality comparison.

GT

public static final int GT
Constant used to indicate that this expression represents a greater than comparison.

GEQ

public static final int GEQ
Constant used to indicate that this expression represents a greater than or equals comparison.

LT

public static final int LT
Constant used to indicate that this expression represents a less than comparison.

LEQ

public static final int LEQ
Constant used to indicate that this expression represents a less than or equals comparison.

SUM

public static final int SUM
Constant used to indicate that this expression represents a sum.

SUB

public static final int SUB
Constant used to indicate that this expression represents a subtraction.

MUL

public static final int MUL
Constant used to indicate that this expression represents a multiplication.

DIV

public static final int DIV
Constant used to indicate that this expression represents a division.
Constructor Detail

BinaryJavaExpr

public BinaryJavaExpr(JavaExpr left,
                      JavaExpr right,
                      int binaryType)
Class constructor.
Parameters:
left - the left subexpression of this binary expression.
right - the right subexpression of this binary expression.
binaryType - the type of this expression.
See Also:
LOR, LAND, EQ, NEQ, GT, GEQ, LT, LEQ, SUM, SUB, MUL, DIV
Method Detail

dump

public void dump(int spaces)
Prints the tree of this expression with the given identation. Useful for debugging.
Overrides:
dump in class JavaExpr
Parameters:
spaces - the identation level for this dumping.

getClasse

public java.lang.Class getClasse()
Returns an object representing the class of this expression.
Overrides:
getClasse in class JavaExpr