protected static class Advice.AdviceVisitor.WithExitAdvice.WithExceptionHandling extends Advice.AdviceVisitor.WithExitAdvice
Advice.AdviceVisitor.WithExitAdvice.WithExceptionHandling, Advice.AdviceVisitor.WithExitAdvice.WithoutExceptionHandlingAdvice.AdviceVisitor.WithExitAdvice, Advice.AdviceVisitor.WithoutExitAdviceAdvice.Dispatcher.RelocationHandler.Relocation.ForLabel| Modifier and Type | Field and Description |
|---|---|
protected Label |
userStart
Indicates the start of the user method.
|
returnHandlerargumentHandler, instrumentedMethod, methodExit, methodSizeHandler, stackMapFrameHandlerapi, mv| Modifier | Constructor and Description |
|---|---|
protected |
WithExceptionHandling(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Assigner assigner,
StackManipulation exceptionHandler,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Advice.Dispatcher.Resolved.ForMethodEnter methodEnter,
Advice.Dispatcher.Resolved.ForMethodExit methodExit,
int writerFlags,
int readerFlags,
TypeDescription throwable)
Creates a new advice visitor that captures exception by weaving try-catch blocks around user code.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
onExitAdviceReturn()
Invoked after the exit advice method has returned.
|
protected void |
onUserPrepare()
Invoked when the user method's exception handler (if any) is supposed to be prepared.
|
protected void |
onUserReturn()
Invoked after the user method has returned.
|
protected void |
onUserStart()
Writes the advice for entering the instrumented method.
|
apply, onUserEnd, onVisitInsnonAfterExceptionTable, onVisitFrame, onVisitIincInsn, onVisitVarInsn, visitLocalVariable, visitLocalVariableAnnotation, visitMaxsonVisitFieldInsn, onVisitIntInsn, onVisitInvokeDynamicInsn, onVisitJumpInsn, onVisitLabel, onVisitLdcInsn, onVisitLookupSwitchInsn, onVisitMethodInsn, onVisitMethodInsn, onVisitMultiANewArrayInsn, onVisitTableSwitchInsn, onVisitTypeInsn, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTypeInsn, visitVarInsngetDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLineNumber, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotationprotected final Label userStart
protected WithExceptionHandling(MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, StackManipulation exceptionHandler, TypeDescription instrumentedType, MethodDescription instrumentedMethod, Advice.Dispatcher.Resolved.ForMethodEnter methodEnter, Advice.Dispatcher.Resolved.ForMethodExit methodExit, int writerFlags, int readerFlags, TypeDescription throwable)
methodVisitor - The method visitor for the instrumented method.instrumentedType - A description of the instrumented type.implementationContext - The implementation context to use.assigner - The assigner to use.exceptionHandler - The stack manipulation to apply within a suppression handler.instrumentedMethod - A description of the instrumented method.methodEnter - The dispatcher to be used for method enter.methodExit - The dispatcher to be used for method exit.writerFlags - The ASM writer flags that were set.readerFlags - The ASM reader flags that were set.throwable - The type of the handled throwable type for which this advice is invoked.protected void onUserPrepare()
Advice.AdviceVisitoronUserPrepare in class Advice.AdviceVisitorprotected void onUserStart()
Advice.AdviceVisitoronUserStart in class Advice.AdviceVisitorprotected void onUserReturn()
Advice.AdviceVisitor.WithExitAdviceonUserReturn in class Advice.AdviceVisitor.WithExitAdviceprotected void onExitAdviceReturn()
Advice.AdviceVisitor.WithExitAdviceonExitAdviceReturn in class Advice.AdviceVisitor.WithExitAdviceCopyright © 2014–2025. All rights reserved.