Class Advice.Dispatcher.Delegating.Resolved.ForMethodExit.WithExceptionHandler

All Implemented Interfaces:
Advice.Dispatcher, Advice.Dispatcher.Resolved, Advice.Dispatcher.Resolved.ForMethodExit
Enclosing class:
Advice.Dispatcher.Delegating.Resolved.ForMethodExit

@Enhance protected static class Advice.Dispatcher.Delegating.Resolved.ForMethodExit.WithExceptionHandler extends Advice.Dispatcher.Delegating.Resolved.ForMethodExit
Implementation of exit advice that handles exceptions.
  • Field Details

    • throwable

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

    • WithExceptionHandler

      protected WithExceptionHandler(MethodDescription.InDefinedShape adviceMethod, Advice.PostProcessor postProcessor, Map<String,TypeDefinition> namedTypes, List<? extends Advice.OffsetMapping.Factory<?>> userFactories, TypeDefinition enterType, TypeDescription throwable, Advice.Delegator delegator)
      Creates a new resolved dispatcher for implementing method exit advice that handles exceptions.
      Parameters:
      adviceMethod - The represented advice method.
      postProcessor - The post processor factory to apply.
      namedTypes - A mapping of all available local variables by their name to their type.
      userFactories - A list of user-defined factories for offset mappings.
      enterType - The type of the value supplied by the enter advice method or a description of void if no such value exists.
      throwable - The type of the handled throwable type for which this advice is invoked.
      delegator - The delegator to use.
  • Method Details

    • getThrowable

      public TypeDescription getThrowable()
      Returns the type of throwable for which this exit advice is supposed to be invoked.
      Returns:
      The Throwable type for which to invoke this exit advice or a description of Advice.NoExceptionHandler if this exit advice does not expect to be invoked upon any throwable.