Package org.jboss.byteman.rule.binding
Class Binding
- java.lang.Object
-
- org.jboss.byteman.rule.RuleElement
-
- org.jboss.byteman.rule.binding.Binding
-
public class Binding extends RuleElement
Class used to store a binding of a named variable to a value of some given type
-
-
Field Summary
-
Fields inherited from class org.jboss.byteman.rule.RuleElement
rule
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aliasTo(Binding alias)
void
compile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext)
Binding
getAlias()
int
getCallArrayIndex()
String
getDescriptor()
int
getIndex()
String
getIVarName()
int
getLocalIndex()
String
getName()
Type
getType()
Expression
getValue()
Object
interpret(HelperAdapter helper)
boolean
isAlias()
boolean
isBindVar()
boolean
isHelper()
boolean
isInvokeParamArray()
boolean
isLocalVar()
boolean
isParam()
boolean
isParamArray()
boolean
isParamCount()
boolean
isRecipient()
boolean
isReturn()
boolean
isThrowable()
boolean
isTriggerClass()
boolean
isTriggerMethod()
boolean
isUpdated()
record that this binding occurs on the LHS of an assignmentvoid
setCallArrayIndex(int callArrayIndex)
void
setDescriptor(String desc)
void
setLocalIndex(int localIndex)
void
setType(Type type)
void
setUpdated()
record that this binding occurs on the LHS of an assignmentExpression
setValue(Expression value)
Type
typeCheck(Type expected)
void
writeTo(StringWriter stringWriter)
-
Methods inherited from class org.jboss.byteman.rule.RuleElement
getBindings, getTypeGroup, rebox, toString
-
-
-
-
Method Detail
-
typeCheck
public Type typeCheck(Type expected) throws TypeException
- Specified by:
typeCheck
in classRuleElement
- Throws:
TypeException
-
interpret
public Object interpret(HelperAdapter helper) throws ExecuteException
- Specified by:
interpret
in classRuleElement
- Throws:
ExecuteException
-
compile
public void compile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext) throws CompileException
- Specified by:
compile
in classRuleElement
- Throws:
CompileException
-
getName
public String getName()
-
getIVarName
public String getIVarName()
-
getValue
public Expression getValue()
-
setValue
public Expression setValue(Expression value)
-
getType
public Type getType()
-
setType
public void setType(Type type)
-
getCallArrayIndex
public int getCallArrayIndex()
-
setCallArrayIndex
public void setCallArrayIndex(int callArrayIndex)
-
getLocalIndex
public int getLocalIndex()
-
setLocalIndex
public void setLocalIndex(int localIndex)
-
isParam
public boolean isParam()
-
isRecipient
public boolean isRecipient()
-
isHelper
public boolean isHelper()
-
isBindVar
public boolean isBindVar()
-
isLocalVar
public boolean isLocalVar()
-
isReturn
public boolean isReturn()
-
isThrowable
public boolean isThrowable()
-
isParamCount
public boolean isParamCount()
-
isParamArray
public boolean isParamArray()
-
isInvokeParamArray
public boolean isInvokeParamArray()
-
isTriggerClass
public boolean isTriggerClass()
-
isTriggerMethod
public boolean isTriggerMethod()
-
getIndex
public int getIndex()
-
getDescriptor
public String getDescriptor()
-
setDescriptor
public void setDescriptor(String desc)
-
setUpdated
public void setUpdated()
record that this binding occurs on the LHS of an assignment
-
isUpdated
public boolean isUpdated()
record that this binding occurs on the LHS of an assignment- Returns:
- true if this binding occurs on the LHS
-
writeTo
public void writeTo(StringWriter stringWriter)
- Specified by:
writeTo
in classRuleElement
-
aliasTo
public void aliasTo(Binding alias)
-
isAlias
public boolean isAlias()
-
getAlias
public Binding getAlias()
-
-