Class MemberSubstitution.SubstitutingMethodVisitor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void visitFieldInsn​(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor)  
      void visitInvokeDynamicInsn​(java.lang.String name, java.lang.String descriptor, org.objectweb.asm.Handle handle, java.lang.Object... argument)  
      void visitMaxs​(int stackSize, int localVariableLength)  
      void visitMethodInsn​(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor, boolean isInterface)  
      • Methods inherited from class org.objectweb.asm.MethodVisitor

        getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • instrumentedType

        private final TypeDescription instrumentedType
        The instrumented type.
      • instrumentedMethod

        private final MethodDescription instrumentedMethod
        The instrumented method.
      • methodGraphCompiler

        private final MethodGraph.Compiler methodGraphCompiler
        The method graph compiler to use.
      • strict

        private final boolean strict
        true if the method processing should be strict where an exception is raised if a member cannot be found.
      • failIfNoMatch

        private final boolean failIfNoMatch
        true if the instrumentation should fail if applied to a method without match.
      • implementationContext

        private final Implementation.Context implementationContext
        The implementation context to use.
      • typePool

        private final TypePool typePool
        The type pool to use.
      • virtualPrivateCalls

        private final boolean virtualPrivateCalls
        If true, virtual method calls might target private methods in accordance to the nest mate specification.
      • stackSizeBuffer

        private int stackSizeBuffer
        An additional buffer for the operand stack that is required.
      • localVariableExtension

        private int localVariableExtension
        The minimum amount of local variable array slots that are required to apply substitutions.
      • matched

        private boolean matched
        true if at least one member was substituted during the application of this visitor.
    • Constructor Detail

      • SubstitutingMethodVisitor

        protected SubstitutingMethodVisitor​(org.objectweb.asm.MethodVisitor methodVisitor,
                                            TypeDescription instrumentedType,
                                            MethodDescription instrumentedMethod,
                                            MethodGraph.Compiler methodGraphCompiler,
                                            boolean strict,
                                            boolean failIfNoMatch,
                                            MemberSubstitution.Replacement replacement,
                                            Implementation.Context implementationContext,
                                            TypePool typePool,
                                            boolean virtualPrivateCalls)
        Creates a new substituting method visitor.
        Parameters:
        methodVisitor - The method visitor to delegate to.
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        methodGraphCompiler - The method graph compiler to use.
        strict - true if the method processing should be strict where an exception is raised if a member cannot be found.
        failIfNoMatch - true if the instrumentation should fail if applied to a method without match.
        replacement - The replacement to use for creating substitutions.
        implementationContext - The implementation context to use.
        typePool - The type pool to use.
        virtualPrivateCalls - true, virtual method calls might target private methods in accordance to the nest mate specification.
    • Method Detail

      • visitFieldInsn

        public void visitFieldInsn​(int opcode,
                                   java.lang.String owner,
                                   java.lang.String internalName,
                                   java.lang.String descriptor)
        Overrides:
        visitFieldInsn in class org.objectweb.asm.MethodVisitor
      • visitMethodInsn

        public void visitMethodInsn​(int opcode,
                                    java.lang.String owner,
                                    java.lang.String internalName,
                                    java.lang.String descriptor,
                                    boolean isInterface)
        Overrides:
        visitMethodInsn in class org.objectweb.asm.MethodVisitor
      • visitInvokeDynamicInsn

        public void visitInvokeDynamicInsn​(java.lang.String name,
                                           java.lang.String descriptor,
                                           org.objectweb.asm.Handle handle,
                                           java.lang.Object... argument)
        Overrides:
        visitInvokeDynamicInsn in class org.objectweb.asm.MethodVisitor
      • visitMaxs

        public void visitMaxs​(int stackSize,
                              int localVariableLength)
        Overrides:
        visitMaxs in class org.objectweb.asm.MethodVisitor