Package net.bytebuddy.asm
Class Advice.Dispatcher.Inlining.Resolved.ForMethodExit.WithExceptionHandler
java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved
net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved.ForMethodExit
net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved.ForMethodExit.WithExceptionHandler
- All Implemented Interfaces:
Advice.Dispatcher
,Advice.Dispatcher.Resolved
,Advice.Dispatcher.Resolved.ForMethodExit
- Enclosing class:
Advice.Dispatcher.Inlining.Resolved.ForMethodExit
@Enhance
protected static class Advice.Dispatcher.Inlining.Resolved.ForMethodExit.WithExceptionHandler
extends Advice.Dispatcher.Inlining.Resolved.ForMethodExit
Implementation of exit advice that handles exceptions.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved.ForMethodExit
Advice.Dispatcher.Inlining.Resolved.ForMethodExit.WithExceptionHandler, Advice.Dispatcher.Inlining.Resolved.ForMethodExit.WithoutExceptionHandler
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved
Advice.Dispatcher.Inlining.Resolved.AdviceMethodInliner, Advice.Dispatcher.Inlining.Resolved.ForMethodEnter, Advice.Dispatcher.Inlining.Resolved.ForMethodExit
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher
Advice.Dispatcher.Bound, Advice.Dispatcher.Delegating, Advice.Dispatcher.Inactive, Advice.Dispatcher.Inlining, Advice.Dispatcher.RelocationHandler, Advice.Dispatcher.Resolved, Advice.Dispatcher.SuppressionHandler, Advice.Dispatcher.Unresolved
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Resolved
Advice.Dispatcher.Resolved.AbstractBase, Advice.Dispatcher.Resolved.ForMethodEnter, Advice.Dispatcher.Resolved.ForMethodExit
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescription
The type of the handled throwable type for which this advice is invoked.Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved
classReader
Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
adviceMethod, offsetMappings, postProcessor, relocationHandler, suppressionHandler
Fields inherited from interface net.bytebuddy.asm.Advice.Dispatcher
IGNORE_ANNOTATION, IGNORE_METHOD
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithExceptionHandler
(MethodDescription.InDefinedShape adviceMethod, Advice.PostProcessor postProcessor, Map<String, TypeDefinition> namedTypes, Map<String, TypeDefinition> uninitializedNamedTypes, List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, TypeDefinition enterType, TypeDescription throwable) Creates a new resolved dispatcher for implementing method exit advice that handles exceptions. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of throwable for which this exit advice is supposed to be invoked.Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved.ForMethodExit
apply, bind, getAdviceType, getArgumentHandlerFactory, getNamedTypes, of, resolveInitializationTypes
Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
isAlive
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.bytebuddy.asm.Advice.Dispatcher
isAlive
-
Field Details
-
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, Map<String, TypeDefinition> uninitializedNamedTypes, List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, TypeDefinition enterType, TypeDescription throwable) Creates a new resolved dispatcher for implementing method exit advice that handles exceptions.- Parameters:
adviceMethod
- The represented advice method.postProcessor
- The post processor to apply.namedTypes
- A mapping of all available local variables by their name to their type.uninitializedNamedTypes
- A mapping of all uninitialized local variables by their name to their type.userFactories
- A list of user-defined factories for offset mappings.classReader
- The class reader for parsing the advice method's class file.enterType
- The type of the value supplied by the enter advice method or a description ofvoid
if no such value exists.throwable
- The type of the handled throwable type for which this advice is invoked.
-
-
Method Details
-
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 ofAdvice.NoExceptionHandler
if this exit advice does not expect to be invoked upon any throwable.
-