Class Advice.AdviceVisitor.WithExitAdvice.WithExceptionHandling

All Implemented Interfaces:
Advice.Dispatcher.RelocationHandler.Relocation
Enclosing class:
Advice.AdviceVisitor.WithExitAdvice

protected static class Advice.AdviceVisitor.WithExitAdvice.WithExceptionHandling extends Advice.AdviceVisitor.WithExitAdvice
An advice visitor that captures exceptions by weaving try-catch blocks around user code.
  • Field Details

    • throwable

      private final TypeDescription throwable
      The type of the handled throwable type for which this advice is invoked.
    • exceptionHandler

      private final org.objectweb.asm.Label exceptionHandler
      Indicates the exception handler.
    • userStart

      protected final org.objectweb.asm.Label userStart
      Indicates the start of the user method.
  • Constructor Details

    • WithExceptionHandling

      protected WithExceptionHandling(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, StackManipulation exceptionHandler, TypeDescription instrumentedType, MethodDescription instrumentedMethod, Advice.Dispatcher.Resolved.ForMethodEnter methodEnter, Advice.Dispatcher.Resolved.ForMethodExit methodExit, int writerFlags, int readerFlags, TypeDescription throwable)
      Creates a new advice visitor that captures exception by weaving try-catch blocks around user code.
      Parameters:
      methodVisitor - The method visitor for the instrumented method.
      instrumentedType - A description of the instrumented type.
      implementationContext - The implementation context to use.
      assigner - The assigner to use.
      exceptionHandler - The stack manipulation to apply within a suppression handler.
      instrumentedMethod - A description of the instrumented method.
      methodEnter - The dispatcher to be used for method enter.
      methodExit - The dispatcher to be used for method exit.
      writerFlags - The ASM writer flags that were set.
      readerFlags - The ASM reader flags that were set.
      throwable - The type of the handled throwable type for which this advice is invoked.
  • Method Details