org.jboss.byteman.rule.expression
Class UnaryOperExpression

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
              extended by org.jboss.byteman.rule.expression.UnaryOperExpression
Direct Known Subclasses:
MinusExpression, NotExpression, TwiddleExpression

public abstract class UnaryOperExpression
extends OperExpression

unary operators includes boolean NOT and arithmetic TWIDDLE n.b. unary MINUS is not currently supported except as part of number parsing


Field Summary
private  Expression operand
           
 
Fields inherited from class org.jboss.byteman.rule.expression.OperExpression
AND, ASSIGN, BAND, BINARY, BOR, BXOR, COND, DIV, EQ, GE, GT, LE, LT, MINUS, MOD, MUL, NE, NOT, oper, OR, PLUS, TERNARY, TWIDDLE, UMINUS, UNARY
 
Fields inherited from class org.jboss.byteman.rule.expression.Expression
charPos, line, rule, token, type
 
Constructor Summary
UnaryOperExpression(Rule rule, int oper, Type type, ParseNode token, Expression operand)
           
 
Method Summary
 void bind()
          verify that variables mentioned in this expression are actually available in the supplied bindings list and infer/validate the type of this expression or its subexpressions where possible
 Expression getOperand(int index)
          return the operand with the given index or null if the index is out of range
 
Methods inherited from class org.jboss.byteman.rule.expression.OperExpression
convertOper, writeTo
 
Methods inherited from class org.jboss.byteman.rule.expression.Expression
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

operand

private Expression operand
Constructor Detail

UnaryOperExpression

public UnaryOperExpression(Rule rule,
                           int oper,
                           Type type,
                           ParseNode token,
                           Expression operand)
Method Detail

bind

public void bind()
          throws TypeException
verify that variables mentioned in this expression are actually available in the supplied bindings list and infer/validate the type of this expression or its subexpressions where possible

Specified by:
bind in class Expression
Throws:
TypeException

getOperand

public Expression getOperand(int index)
return the operand with the given index or null if the index is out of range

Specified by:
getOperand in class OperExpression
Parameters:
index -
Returns:
the operand with the given index