Class OperExpression
- java.lang.Object
-
- org.jboss.byteman.rule.RuleElement
-
- org.jboss.byteman.rule.expression.Expression
-
- org.jboss.byteman.rule.expression.OperExpression
-
- Direct Known Subclasses:
BinaryOperExpression
,TernaryOperExpression
,UnaryOperExpression
public abstract class OperExpression extends Expression
generic operator expression subsumes unary, binary and ternary operators
-
-
Field Summary
Fields Modifier and Type Field Description static int
AND
static int
ASSIGN
static int
BAND
static int
BINARY
static int
BOR
static int
BXOR
static int
COND
static int
DIV
static int
EQ
static int
GE
static int
GT
static int
INSTANCEOF
static int
LE
static int
LSH
static int
LT
static int
MINUS
static int
MOD
static int
MUL
static int
NE
static int
NOT
protected int
oper
private static java.lang.String[]
operandNames
private static int[]
operands
static int
OR
private static int[]
parserOperands
static int
PLUS
static int
RSH
static int
TERNARY
static int
TWIDDLE
static int
UMINUS
static int
UNARY
static int
URSH
-
Constructor Summary
Constructors Constructor Description OperExpression(Rule rule, int oper, Type type, ParseNode token)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static int
convertOper(int parserOper)
abstract Expression
getOperand(int index)
return the operand with the given index or null if the index is out of rangeprivate java.lang.String
getOperandString()
void
writeTo(java.io.StringWriter stringWriter)
-
Methods inherited from class org.jboss.byteman.rule.expression.Expression
bind, getPos, getType, interpret, typeCheck
-
Methods inherited from class org.jboss.byteman.rule.RuleElement
compile, getBindings, getTypeGroup, rebox, toString
-
-
-
-
Field Detail
-
oper
protected int oper
-
UNARY
public static final int UNARY
- See Also:
- Constant Field Values
-
BINARY
public static final int BINARY
- See Also:
- Constant Field Values
-
TERNARY
public static final int TERNARY
- See Also:
- Constant Field Values
-
NOT
public static final int NOT
- See Also:
- Constant Field Values
-
TWIDDLE
public static final int TWIDDLE
- See Also:
- Constant Field Values
-
OR
public static final int OR
- See Also:
- Constant Field Values
-
AND
public static final int AND
- See Also:
- Constant Field Values
-
EQ
public static final int EQ
- See Also:
- Constant Field Values
-
NE
public static final int NE
- See Also:
- Constant Field Values
-
GT
public static final int GT
- See Also:
- Constant Field Values
-
LT
public static final int LT
- See Also:
- Constant Field Values
-
GE
public static final int GE
- See Also:
- Constant Field Values
-
LE
public static final int LE
- See Also:
- Constant Field Values
-
BOR
public static final int BOR
- See Also:
- Constant Field Values
-
BAND
public static final int BAND
- See Also:
- Constant Field Values
-
BXOR
public static final int BXOR
- See Also:
- Constant Field Values
-
URSH
public static final int URSH
- See Also:
- Constant Field Values
-
RSH
public static final int RSH
- See Also:
- Constant Field Values
-
LSH
public static final int LSH
- See Also:
- Constant Field Values
-
INSTANCEOF
public static final int INSTANCEOF
- See Also:
- Constant Field Values
-
UMINUS
public static final int UMINUS
- See Also:
- Constant Field Values
-
MUL
public static final int MUL
- See Also:
- Constant Field Values
-
DIV
public static final int DIV
- See Also:
- Constant Field Values
-
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
-
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
-
MOD
public static final int MOD
- See Also:
- Constant Field Values
-
ASSIGN
public static final int ASSIGN
- See Also:
- Constant Field Values
-
COND
public static final int COND
- See Also:
- Constant Field Values
-
operands
private static final int[] operands
-
parserOperands
private static final int[] parserOperands
-
operandNames
private static final java.lang.String[] operandNames
-
-
Method Detail
-
getOperand
public abstract Expression getOperand(int index)
return the operand with the given index or null if the index is out of range- Parameters:
index
- the index- Returns:
- the operand with the given index
-
writeTo
public void writeTo(java.io.StringWriter stringWriter)
- Specified by:
writeTo
in classExpression
-
getOperandString
private java.lang.String getOperandString()
-
convertOper
public static int convertOper(int parserOper)
-
-