Class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter

java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
All Implemented Interfaces:
Advice.Dispatcher.Bound
Direct Known Subclasses:
Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter, Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit
Enclosing class:
Advice.Dispatcher.Delegating.Resolved

protected abstract static class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter extends Object implements Advice.Dispatcher.Bound
A bound advice method that copies the code by first extracting the exception table and later appending the code of the method without copying any meta data.
  • Field Details

    • typeToken

      protected final MethodDescription.TypeToken typeToken
      The advice method.
    • instrumentedType

      private final TypeDescription instrumentedType
      The instrumented type.
    • instrumentedMethod

      private final MethodDescription instrumentedMethod
      The instrumented method.
    • assigner

      private final Assigner assigner
      The assigner to use.
    • offsetMappings

      private final List<Advice.OffsetMapping.Target> offsetMappings
      The offset mappings available to this advice.
    • 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.
    • argumentHandler

      protected final Advice.ArgumentHandler.ForAdvice argumentHandler
      A handler for accessing values on the local variable array.
    • methodSizeHandler

      protected final Advice.MethodSizeHandler.ForAdvice methodSizeHandler
      A handler for computing the method size requirements.
    • stackMapFrameHandler

      protected final Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler
      A handler for translating and injecting stack map frames.
    • suppressionHandler

      private final Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler
      A bound suppression handler that is used for suppressing exceptions of this advice method.
    • relocationHandler

      private final Advice.Dispatcher.RelocationHandler.Bound relocationHandler
      A bound relocation handler that is responsible for considering a non-standard control flow.
    • exceptionHandler

      private final StackManipulation exceptionHandler
      The exception handler that is resolved for the instrumented method.
    • postProcessor

      private final Advice.PostProcessor postProcessor
      The post processor to apply.
    • delegator

      private final Advice.Delegator delegator
      The delegator to use.
  • Constructor Details

  • Method Details

    • prepare

      public void prepare()
      Prepares the advice method's exception handlers.
      Specified by:
      prepare in interface Advice.Dispatcher.Bound
    • apply

      public void apply()
      Applies this dispatcher.
      Specified by:
      apply in interface Advice.Dispatcher.Bound
    • isExitAdvice

      protected abstract boolean isExitAdvice()
      Returns true if this writer represents exit advice.
      Returns:
      true if this writer represents exit advice.