cetus.hir
Class BinaryOperator

java.lang.Object
  extended by cetus.hir.BinaryOperator
All Implemented Interfaces:
Printable
Direct Known Subclasses:
AccessOperator, AssignmentOperator

public class BinaryOperator
extends java.lang.Object
implements Printable

Infix operators that act on two expressions.


Field Summary
static BinaryOperator ADD
          +
static BinaryOperator BITWISE_AND
          &
static BinaryOperator BITWISE_EXCLUSIVE_OR
          ^
static BinaryOperator BITWISE_INCLUSIVE_OR
          |
static BinaryOperator COMPARE_EQ
          ==
static BinaryOperator COMPARE_GE
          >=
static BinaryOperator COMPARE_GT
          >
static BinaryOperator COMPARE_LE
          <=
static BinaryOperator COMPARE_LT
          <
static BinaryOperator COMPARE_NE
          !=
static BinaryOperator DIVIDE
          /
static BinaryOperator INSTANCEOF
          instanceof
static BinaryOperator LOGICAL_AND
          &&
static BinaryOperator LOGICAL_OR
          ||
static BinaryOperator MODULUS
          %
static BinaryOperator MULTIPLY
          *
static BinaryOperator SHIFT_LEFT
          <<
static BinaryOperator SHIFT_RIGHT
          >>
static BinaryOperator SUBTRACT
          -
protected  int value
           
 
Constructor Summary
protected BinaryOperator()
           
 
Method Summary
static BinaryOperator fromString(java.lang.String s)
           
 void print(java.io.OutputStream stream)
          Print the code for the IR represented by the object.
 java.lang.String toString()
           
 void verify()
          Verifies this operator is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final BinaryOperator ADD
+


BITWISE_AND

public static final BinaryOperator BITWISE_AND
&


BITWISE_EXCLUSIVE_OR

public static final BinaryOperator BITWISE_EXCLUSIVE_OR
^


BITWISE_INCLUSIVE_OR

public static final BinaryOperator BITWISE_INCLUSIVE_OR
|


COMPARE_EQ

public static final BinaryOperator COMPARE_EQ
==


COMPARE_GE

public static final BinaryOperator COMPARE_GE
>=


COMPARE_GT

public static final BinaryOperator COMPARE_GT
>


COMPARE_LE

public static final BinaryOperator COMPARE_LE
<=


COMPARE_LT

public static final BinaryOperator COMPARE_LT
<


COMPARE_NE

public static final BinaryOperator COMPARE_NE
!=


DIVIDE

public static final BinaryOperator DIVIDE
/


LOGICAL_AND

public static final BinaryOperator LOGICAL_AND
&&


LOGICAL_OR

public static final BinaryOperator LOGICAL_OR
||


MODULUS

public static final BinaryOperator MODULUS
%


MULTIPLY

public static final BinaryOperator MULTIPLY
*


SHIFT_LEFT

public static final BinaryOperator SHIFT_LEFT
<<


SHIFT_RIGHT

public static final BinaryOperator SHIFT_RIGHT
>>


SUBTRACT

public static final BinaryOperator SUBTRACT
-


INSTANCEOF

public static final BinaryOperator INSTANCEOF
instanceof


value

protected int value
Constructor Detail

BinaryOperator

protected BinaryOperator()
Method Detail

fromString

public static BinaryOperator fromString(java.lang.String s)

print

public void print(java.io.OutputStream stream)
Description copied from interface: Printable
Print the code for the IR represented by the object. Always calls object_print_method(this, stream). If the object's print method is null, nothing is printed; this provides an easy mechanism to temporarily hide something.

Specified by:
print in interface Printable
Parameters:
stream - The stream on which to print the data.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

verify

public void verify()
            throws java.lang.IllegalStateException
Verifies this operator is valid.

Throws:
java.lang.IllegalStateException - if the operator is invalid.