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 intANDstatic intASSIGNstatic intBANDstatic intBINARYstatic intBORstatic intBXORstatic intCONDstatic intDIVstatic intEQstatic intGEstatic intGTstatic intLEstatic intLSHstatic intLTstatic intMINUSstatic intMODstatic intMULstatic intNEstatic intNOTprotected intoperprivate static java.lang.String[]operandNamesprivate static int[]operandsstatic intORprivate static int[]parserOperandsstatic intPLUSstatic intRSHstatic intTERNARYstatic intTWIDDLEstatic intUMINUSstatic intUNARYstatic intURSH
-
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 intconvertOper(int parserOper)abstract ExpressiongetOperand(int index)return the operand with the given index or null if the index is out of rangeprivate java.lang.StringgetOperandString()voidwriteTo(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
-
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:
writeToin classExpression
-
getOperandString
private java.lang.String getOperandString()
-
convertOper
public static int convertOper(int parserOper)
-
-