Package net.bytebuddy.asm
Class Advice.ExceptionHandler.Simple
java.lang.Object
net.bytebuddy.asm.Advice.ExceptionHandler.Simple
- All Implemented Interfaces:
Advice.ExceptionHandler
- Enclosing interface:
Advice.ExceptionHandler
@Enhance
public static class Advice.ExceptionHandler.Simple
extends Object
implements Advice.ExceptionHandler
A simple exception handler that returns a fixed stack manipulation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ExceptionHandler
Advice.ExceptionHandler.Default, Advice.ExceptionHandler.Simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StackManipulation
The stack manipulation to execute. -
Constructor Summary
ConstructorsConstructorDescriptionSimple
(StackManipulation stackManipulation) Creates a new simple exception handler. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(MethodDescription instrumentedMethod, TypeDescription instrumentedType) Resolves a stack manipulation to apply.
-
Field Details
-
stackManipulation
The stack manipulation to execute.
-
-
Constructor Details
-
Simple
Creates a new simple exception handler.- Parameters:
stackManipulation
- The stack manipulation to execute.
-
-
Method Details
-
resolve
public StackManipulation resolve(MethodDescription instrumentedMethod, TypeDescription instrumentedType) Resolves a stack manipulation to apply.- Specified by:
resolve
in interfaceAdvice.ExceptionHandler
- Parameters:
instrumentedMethod
- The instrumented method.instrumentedType
- The instrumented type.- Returns:
- The stack manipulation to use.
-