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 Modifier and Type Field Description private Bindingaliasprivate static intBIND_VARprivate intcallArrayIndexprivate java.lang.Stringdescriptor(package private) booleandoCheckCastprivate static intHELPERprivate intindexprivate static intINVOKE_PARAM_ARRAY_VARprivate static intLOCAL_VARprivate intlocalIndexprivate java.lang.Stringnameprivate static intPARAM_ARRAY_VARprivate static intPARAM_COUNT_VARprivate static intRETURN_VARprivate static intTHROWABLE_VARprivate Typetype(package private) booleanupdatedprivate Expressionvalue-
Fields inherited from class org.jboss.byteman.rule.RuleElement
rule
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaliasTo(Binding alias)voidcompile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext)BindinggetAlias()intgetCallArrayIndex()java.lang.StringgetDescriptor()intgetIndex()java.lang.StringgetIVarName()intgetLocalIndex()java.lang.StringgetName()TypegetType()ExpressiongetValue()java.lang.Objectinterpret(HelperAdapter helper)booleanisAlias()booleanisBindVar()booleanisHelper()booleanisInvokeParamArray()booleanisLocalVar()booleanisParam()booleanisParamArray()booleanisParamCount()booleanisRecipient()booleanisReturn()booleanisThrowable()booleanisTriggerClass()booleanisTriggerMethod()booleanisUpdated()record that this binding occurs on the LHS of an assignmentprivate voidresolveUnknownAgainstDerived(Type derived)voidsetCallArrayIndex(int callArrayIndex)voidsetDescriptor(java.lang.String desc)voidsetLocalIndex(int localIndex)voidsetType(Type type)voidsetUpdated()record that this binding occurs on the LHS of an assignmentExpressionsetValue(Expression value)TypetypeCheck(Type expected)voidwriteTo(java.io.StringWriter stringWriter)-
Methods inherited from class org.jboss.byteman.rule.RuleElement
getBindings, getTypeGroup, rebox, toString
-
-
-
-
Field Detail
-
HELPER
private static final int HELPER
- See Also:
- Constant Field Values
-
BIND_VAR
private static final int BIND_VAR
- See Also:
- Constant Field Values
-
LOCAL_VAR
private static final int LOCAL_VAR
- See Also:
- Constant Field Values
-
RETURN_VAR
private static final int RETURN_VAR
- See Also:
- Constant Field Values
-
THROWABLE_VAR
private static final int THROWABLE_VAR
- See Also:
- Constant Field Values
-
PARAM_COUNT_VAR
private static final int PARAM_COUNT_VAR
- See Also:
- Constant Field Values
-
PARAM_ARRAY_VAR
private static final int PARAM_ARRAY_VAR
- See Also:
- Constant Field Values
-
INVOKE_PARAM_ARRAY_VAR
private static final int INVOKE_PARAM_ARRAY_VAR
- See Also:
- Constant Field Values
-
name
private java.lang.String name
-
descriptor
private java.lang.String descriptor
-
type
private Type type
-
value
private Expression value
-
index
private int index
-
callArrayIndex
private int callArrayIndex
-
localIndex
private int localIndex
-
alias
private Binding alias
-
updated
boolean updated
-
doCheckCast
boolean doCheckCast
-
-
Method Detail
-
typeCheck
public Type typeCheck(Type expected) throws TypeException
- Specified by:
typeCheckin classRuleElement- Throws:
TypeException
-
resolveUnknownAgainstDerived
private void resolveUnknownAgainstDerived(Type derived) throws TypeException
- Throws:
TypeException
-
interpret
public java.lang.Object interpret(HelperAdapter helper) throws ExecuteException
- Specified by:
interpretin classRuleElement- Throws:
ExecuteException
-
compile
public void compile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext) throws CompileException- Specified by:
compilein classRuleElement- Throws:
CompileException
-
getName
public java.lang.String getName()
-
getIVarName
public java.lang.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 java.lang.String getDescriptor()
-
setDescriptor
public void setDescriptor(java.lang.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(java.io.StringWriter stringWriter)
- Specified by:
writeToin classRuleElement
-
aliasTo
public void aliasTo(Binding alias)
-
isAlias
public boolean isAlias()
-
getAlias
public Binding getAlias()
-
-