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 java.lang.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
Fields Modifier and Type Field Description private StackManipulation
stackManipulation
The stack manipulation to execute.
-
Constructor Summary
Constructors Constructor Description Simple(StackManipulation stackManipulation)
Creates a new simple exception handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
resolve(MethodDescription instrumentedMethod, TypeDescription instrumentedType)
Resolves a stack manipulation to apply.
-
-
-
Field Detail
-
stackManipulation
private final StackManipulation stackManipulation
The stack manipulation to execute.
-
-
Constructor Detail
-
Simple
public Simple(StackManipulation stackManipulation)
Creates a new simple exception handler.- Parameters:
stackManipulation
- The stack manipulation to execute.
-
-
Method Detail
-
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.
-
-