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
  • Field Details

    • access

      private int access
    • name

      private String name
    • descriptor

      private String descriptor
    • signature

      private String signature
    • exceptions

      private String[] 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 interface LocalScopeMethodVisitor
      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 interface LocalScopeMethodVisitor
      Parameters:
      name -
      desc -
      signature -
      stackSlot -
    • visitVarInsn

      public void visitVarInsn(int opcode, int var)
      Overrides:
      visitVarInsn in class org.objectweb.asm.MethodVisitor
    • visitIincInsn

      public void visitIincInsn(int var, int increment)
      Overrides:
      visitIincInsn in class org.objectweb.asm.MethodVisitor