org.jboss.byteman.rule.expression
Class OperExpression

java.lang.Object
  extended by org.jboss.byteman.rule.RuleElement
      extended by org.jboss.byteman.rule.expression.Expression
          extended by 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
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 LE
           
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 TERNARY
           
static int TWIDDLE
           
static int UMINUS
           
static int UNARY
           
 
Fields inherited from class org.jboss.byteman.rule.expression.Expression
charPos, line, rule, token, type
 
Constructor Summary
OperExpression(Rule rule, int oper, Type type, ParseNode token)
           
 
Method Summary
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 range
private  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, compileBooleanConversion, compileBox, compileNumericConversion, compileObjectConversion, compilePrimitiveConversion, compileStringConversion, compileTypeConversion, compileUnbox, getBindings, getTypeGroup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

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
Constructor Detail

OperExpression

OperExpression(Rule rule,
               int oper,
               Type type,
               ParseNode token)
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 -
Returns:
the operand with the given index

writeTo

public void writeTo(java.io.StringWriter stringWriter)
Specified by:
writeTo in class Expression

getOperandString

private java.lang.String getOperandString()

convertOper

public static int convertOper(int parserOper)