Class TernaryOperExpression
- java.lang.Object
-
- org.jboss.byteman.rule.RuleElement
-
- org.jboss.byteman.rule.expression.Expression
-
- org.jboss.byteman.rule.expression.OperExpression
-
- org.jboss.byteman.rule.expression.TernaryOperExpression
-
- Direct Known Subclasses:
ConditionalEvalExpression
public abstract class TernaryOperExpression extends OperExpression
ternary operators includes conditional evaluation operator 'cond ? if_expr : else_expr'
-
-
Field Summary
Fields Modifier and Type Field Description private Expressionoperand1private Expressionoperand2private Expressionoperand3
-
Constructor Summary
Constructors Constructor Description TernaryOperExpression(Rule rule, int oper, Type type, ParseNode token, Expression operand1, Expression operand2, Expression operand3)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind()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 possibleExpressiongetOperand(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, getBindings, getTypeGroup, rebox, toString
-
-
-
-
Field Detail
-
operand1
private Expression operand1
-
operand2
private Expression operand2
-
operand3
private Expression operand3
-
-
Constructor Detail
-
TernaryOperExpression
public TernaryOperExpression(Rule rule, int oper, Type type, ParseNode token, Expression operand1, Expression operand2, Expression operand3)
-
-
Method Detail
-
bind
public void bind() throws TypeExceptionverify 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:
bindin classExpression- Throws:
TypeException- if any variable is missing or has the wrong type
-
getOperand
public Expression getOperand(int index)
return the operand with the given index or null if the index is out of range- Specified by:
getOperandin classOperExpression- Parameters:
index- the index- Returns:
- the operand with the given index
-
-