Class Advice.StackMapFrameHandler.Default.WithPreservedArguments.RequiringConsistentShape

    • Constructor Detail

      • RequiringConsistentShape

        protected RequiringConsistentShape​(TypeDescription instrumentedType,
                                           MethodDescription instrumentedMethod,
                                           java.util.List<? extends TypeDescription> enterTypes,
                                           java.util.List<? extends TypeDescription> exitTypes,
                                           boolean expandFrames)
        Creates a new stack map frame handler that expects the original frames to be preserved.
        Parameters:
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        enterTypes - A list of virtual method arguments that are available before the instrumented method is executed.
        exitTypes - A list of virtual method arguments that are available after the instrumented method has completed.
        expandFrames - true if the meta data handler is expected to expand its frames.
    • Method Detail

      • injectStartFrame

        public void injectStartFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Description copied from interface: Advice.StackMapFrameHandler.ForInstrumentedMethod
        Injects a frame before executing the instrumented method.
        Parameters:
        methodVisitor - The method visitor to write any frames to.
      • translateFrame

        public void translateFrame​(org.objectweb.asm.MethodVisitor methodVisitor,
                                   int type,
                                   int localVariableLength,
                                   java.lang.Object[] localVariable,
                                   int stackSize,
                                   java.lang.Object[] stack)
        Description copied from interface: Advice.StackMapFrameHandler
        Translates a frame.
        Parameters:
        methodVisitor - The method visitor to write the frame to.
        type - The frame's type.
        localVariableLength - The local variable length.
        localVariable - An array containing the types of the current local variables.
        stackSize - The size of the operand stack.
        stack - An array containing the types of the current operand stack.