Package org.jboss.byteman.agent.adapter
Class VariableAccessCheckAdapter.VariableAccessCheckMethodAdapter
java.lang.Object
org.objectweb.asm.MethodVisitor
org.jboss.byteman.agent.adapter.RuleMethodAdapter
org.jboss.byteman.agent.adapter.RuleCheckMethodAdapter
org.jboss.byteman.agent.adapter.VariableAccessCheckAdapter.VariableAccessCheckMethodAdapter
- All Implemented Interfaces:
LocalScopeMethodVisitor
- Enclosing class:
VariableAccessCheckAdapter
private class VariableAccessCheckAdapter.VariableAccessCheckMethodAdapter
extends RuleCheckMethodAdapter
implements LocalScopeMethodVisitor
a method visitor used to add a rule event trigger call to a method
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
RuleMethodAdapter.LocalVar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private String
private String[]
private int
private String
private String
private int
Fields inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
localVarsByName, rule, transformContext
Fields inherited from class org.objectweb.asm.MethodVisitor
api, mv
-
Constructor Summary
ConstructorsConstructorDescriptionVariableAccessCheckMethodAdapter
(org.objectweb.asm.MethodVisitor mv, TransformContext transformContext, int access, String name, String descriptor, String signature, String[] exceptions) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
matchCall
(int opcode) void
visitIincInsn
(int var, int increment) void
visitLocalScopeEnd
(String name, String desc, String signature, int stackSlot, int endOffset) checks if the local var going out of scope is the one mentioned in the rule location and if so records that the slot is no longer active.void
visitLocalScopeStart
(String name, String desc, String signature, int stackSlot, int startOffset) checks if the local var coming into scope is the one mentioned in the rule location and if so records which slot is now being used to store the variable.void
visitVarInsn
(int opcode, int var) Methods inherited from class org.jboss.byteman.agent.adapter.RuleCheckMethodAdapter
checkBindings, getNewTypeParamDescriptor, getReturnBindingType, isTriggerPoint, setTriggerPoint, visitEnd
Methods inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
getTriggerClassName, lookup, visitLocalVariable
Methods inherited from class org.objectweb.asm.MethodVisitor
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitFieldInsn, visitFrame, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn
-
Field Details
-
access
private int access -
name
-
descriptor
-
signature
-
exceptions
-
index
private int index -
visitedCount
private int visitedCount
-
-
Constructor Details
-
VariableAccessCheckMethodAdapter
VariableAccessCheckMethodAdapter(org.objectweb.asm.MethodVisitor mv, TransformContext transformContext, int access, String name, String descriptor, String signature, String[] exceptions)
-
-
Method Details
-
matchCall
private boolean matchCall(int opcode) -
visitLocalScopeStart
public void visitLocalScopeStart(String name, String desc, String signature, int stackSlot, int startOffset) checks if the local var coming into scope is the one mentioned in the rule location and if so records which slot is now being used to store the variable. this is called by the BMJSRInliner which feeds this adapter because this adapter implements LocalScopeMethodVisitor- Specified by:
visitLocalScopeStart
in interfaceLocalScopeMethodVisitor
- Parameters:
name
-desc
-signature
-stackSlot
-
-
visitLocalScopeEnd
public void visitLocalScopeEnd(String name, String desc, String signature, int stackSlot, int endOffset) checks if the local var going out of scope is the one mentioned in the rule location and if so records that the slot is no longer active. this is called by the BMJSRInliner which feeds this adapter because this adapter implements LocalScopeMethodVisitor- Specified by:
visitLocalScopeEnd
in interfaceLocalScopeMethodVisitor
- Parameters:
name
-desc
-signature
-stackSlot
-
-
visitVarInsn
public void visitVarInsn(int opcode, int var) - Overrides:
visitVarInsn
in classorg.objectweb.asm.MethodVisitor
-
visitIincInsn
public void visitIincInsn(int var, int increment) - Overrides:
visitIincInsn
in classorg.objectweb.asm.MethodVisitor
-