Package net.bytebuddy.asm
Class Advice.Dispatcher.SuppressionHandler.Suppressing.Bound
java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.SuppressionHandler.Suppressing.Bound
- All Implemented Interfaces:
Advice.Dispatcher.SuppressionHandler.Bound
- Enclosing class:
Advice.Dispatcher.SuppressionHandler.Suppressing
protected static class Advice.Dispatcher.SuppressionHandler.Suppressing.Bound
extends Object
implements Advice.Dispatcher.SuppressionHandler.Bound
An active, bound suppression handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.objectweb.asm.Label
A label indicating the end of the method.private final StackManipulation
The stack manipulation to apply within a suppression handler.private final org.objectweb.asm.Label
A label indicating the start of the method.private final TypeDescription
The suppressed throwable type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Bound
(TypeDescription suppressedType, StackManipulation exceptionHandler) Creates a new active, bound suppression handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onEnd
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, TypeDefinition returnType) Invoked at the end of a method.void
onEndWithSkip
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, TypeDefinition returnType) Invoked at the end of a method if the exception handler should be wrapped in a skipping block.void
onPrepare
(org.objectweb.asm.MethodVisitor methodVisitor) Invoked to prepare the suppression handler, i.e.void
onStart
(org.objectweb.asm.MethodVisitor methodVisitor) Invoked at the start of a method.
-
Field Details
-
suppressedType
The suppressed throwable type. -
exceptionHandler
The stack manipulation to apply within a suppression handler. -
startOfMethod
private final org.objectweb.asm.Label startOfMethodA label indicating the start of the method. -
endOfMethod
private final org.objectweb.asm.Label endOfMethodA label indicating the end of the method.
-
-
Constructor Details
-
Bound
Creates a new active, bound suppression handler.- Parameters:
suppressedType
- The suppressed throwable type.exceptionHandler
- The stack manipulation to apply within a suppression handler.
-
-
Method Details
-
onPrepare
public void onPrepare(org.objectweb.asm.MethodVisitor methodVisitor) Invoked to prepare the suppression handler, i.e. to write an exception handler entry if appropriate.- Specified by:
onPrepare
in interfaceAdvice.Dispatcher.SuppressionHandler.Bound
- Parameters:
methodVisitor
- The method visitor to apply the preparation to.
-
onStart
public void onStart(org.objectweb.asm.MethodVisitor methodVisitor) Invoked at the start of a method.- Specified by:
onStart
in interfaceAdvice.Dispatcher.SuppressionHandler.Bound
- Parameters:
methodVisitor
- The method visitor of the instrumented method.
-
onEnd
public void onEnd(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, TypeDefinition returnType) Invoked at the end of a method.- Specified by:
onEnd
in interfaceAdvice.Dispatcher.SuppressionHandler.Bound
- Parameters:
methodVisitor
- The method visitor of the instrumented method.implementationContext
- The implementation context to use.methodSizeHandler
- The advice method's method size handler.stackMapFrameHandler
- A handler for translating and injecting stack map frames.returnType
- The return type of the advice method.
-
onEndWithSkip
public void onEndWithSkip(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, TypeDefinition returnType) Invoked at the end of a method if the exception handler should be wrapped in a skipping block.- Specified by:
onEndWithSkip
in interfaceAdvice.Dispatcher.SuppressionHandler.Bound
- Parameters:
methodVisitor
- The method visitor of the instrumented method.implementationContext
- The implementation context to use.methodSizeHandler
- The advice method's method size handler.stackMapFrameHandler
- A handler for translating and injecting stack map frames.returnType
- The return type of the advice method.
-