Class Advice.StackMapFrameHandler.Default.WithPreservedArguments

    • Constructor Detail

      • WithPreservedArguments

        protected WithPreservedArguments​(TypeDescription instrumentedType,
                                         MethodDescription instrumentedMethod,
                                         java.util.List<? extends TypeDescription> initialTypes,
                                         java.util.List<? extends TypeDescription> preMethodTypes,
                                         java.util.List<? extends TypeDescription> postMethodTypes,
                                         boolean expandFrames)
        Creates a new stack map frame handler that requires the stack map frames of the original arguments to be preserved.
        Parameters:
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        initialTypes - A list of virtual method arguments that are explicitly added before any code execution.
        preMethodTypes - A list of virtual method arguments that are available before the instrumented method is executed.
        postMethodTypes - 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

      • injectReturnFrame

        public void injectReturnFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Injects a frame indicating the beginning of a return value handler for the currently handled method.
        Parameters:
        methodVisitor - The method visitor onto which to apply the stack map frame.
      • injectExceptionFrame

        public void injectExceptionFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Injects a frame indicating the beginning of an exception handler for the currently handled method.
        Parameters:
        methodVisitor - The method visitor onto which to apply the stack map frame.
      • injectCompletionFrame

        public void injectCompletionFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Injects a frame indicating the completion of the currently handled method, i.e. all yielded types were added.
        Parameters:
        methodVisitor - The method visitor onto which to apply the stack map frame.
      • injectPostCompletionFrame

        public void injectPostCompletionFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Injects a frame indicating the completion of the currently handled method, i.e. all yielded types were added.
        Parameters:
        methodVisitor - The method visitor onto which to apply the stack map frame.
      • injectInitializationFrame

        public void injectInitializationFrame​(org.objectweb.asm.MethodVisitor methodVisitor)
        Injects a frame after initialization if any initialization is performed.
        Parameters:
        methodVisitor - The method visitor to write any frames to.