Class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter

    • Field Detail

      • instrumentedMethod

        protected final MethodDescription instrumentedMethod
        The instrumented method.
      • methodVisitor

        protected final org.objectweb.asm.MethodVisitor methodVisitor
        The method visitor for writing the instrumented method.
      • implementationContext

        protected final Implementation.Context implementationContext
        The implementation context to use.
    • Constructor Detail

      • AdviceMethodWriter

        protected AdviceMethodWriter​(MethodDescription.InDefinedShape adviceMethod,
                                     MethodDescription instrumentedMethod,
                                     java.util.List<Advice.OffsetMapping.Target> offsetMappings,
                                     org.objectweb.asm.MethodVisitor methodVisitor,
                                     Implementation.Context implementationContext,
                                     Advice.MethodSizeHandler.ForAdvice methodSizeHandler,
                                     Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler,
                                     Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler)
        Creates a new advice method writer.
        Parameters:
        adviceMethod - The advice method.
        instrumentedMethod - The instrumented method.
        offsetMappings - The offset mappings available to this advice.
        methodVisitor - The method visitor for writing the instrumented method.
        implementationContext - The implementation context to use.
        methodSizeHandler - A handler for computing the method size requirements.
        stackMapFrameHandler - A handler for translating and injecting stack map frames.
        suppressionHandler - A bound suppression handler that is used for suppressing exceptions of this advice method.
    • Method Detail

      • doApply

        protected void doApply()
        Writes the advice method invocation.
      • onMethodReturn

        protected abstract void onMethodReturn()
        Invoked directly after the advice method was called.