public class Operator
extends java.lang.Object
This class is used to represent expression operators. Operator objects are not AST elements.
Notes:
CAST_TO_DOUBLE
and CAST_TO_BOOLEAN
are not legal Java operators,
but present for the sake of consistency.LOG_IDENT
is a pseudo logical operator representing the identity. It is the opposite of LOG_NOT,
and can be used during AST optimizations phases to maintain expression object consistency.toString()
method.Expression
Modifier and Type | Field and Description |
---|---|
static Operator |
ADD |
static Operator |
AND |
static Operator |
CAST_TO_BOOLEAN |
static Operator |
CAST_TO_BYTE |
static Operator |
CAST_TO_CHAR |
static Operator |
CAST_TO_DOUBLE |
static Operator |
CAST_TO_FLOAT |
static Operator |
CAST_TO_INT |
static Operator |
CAST_TO_LONG |
static Operator |
CAST_TO_SHORT |
static Operator |
CONCAT |
static Operator |
DIV |
static Operator |
EQ |
static Operator |
GE |
static Operator |
GT |
static Operator |
INSTANCEOF |
static Operator |
LE |
static Operator |
LOG_AND |
static Operator |
LOG_IDENT |
static Operator |
LOG_NOT |
static Operator |
LOG_OR |
static Operator |
LT |
static Operator |
MUL |
static Operator |
NE |
static Operator |
NEG |
static Operator |
NOT |
static Operator |
OR |
static Operator |
REM |
static Operator |
SHL |
static Operator |
SHR |
static Operator |
SUB |
static Operator |
USHR |
static Operator |
XOR |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Get a string representation of the operator.
|
public static final Operator ADD
public static final Operator SUB
public static final Operator MUL
public static final Operator DIV
public static final Operator REM
public static final Operator AND
public static final Operator OR
public static final Operator XOR
public static final Operator SHL
public static final Operator SHR
public static final Operator USHR
public static final Operator NEG
public static final Operator NOT
public static final Operator LOG_IDENT
public static final Operator LOG_NOT
public static final Operator LOG_OR
public static final Operator LOG_AND
public static final Operator INSTANCEOF
public static final Operator EQ
public static final Operator NE
public static final Operator LT
public static final Operator GE
public static final Operator GT
public static final Operator LE
public static final Operator CAST_TO_BYTE
public static final Operator CAST_TO_CHAR
public static final Operator CAST_TO_SHORT
public static final Operator CAST_TO_INT
public static final Operator CAST_TO_LONG
public static final Operator CAST_TO_FLOAT
public static final Operator CAST_TO_DOUBLE
public static final Operator CAST_TO_BOOLEAN
public static final Operator CONCAT
public java.lang.String toString()
Get a string representation of the operator. If the operator is a non-standard cast-to-type (where type is not a primitive type), the string representation is currently the only way to determine what the operator really does.
toString
in class java.lang.Object