protected abstract static class Advice.AdviceVisitor.WithExitAdvice extends Advice.AdviceVisitor
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Advice.AdviceVisitor.WithExitAdvice.WithExceptionHandling
An advice visitor that captures exceptions by weaving try-catch blocks around user code.
|
protected static class |
Advice.AdviceVisitor.WithExitAdvice.WithoutExceptionHandling
An advice visitor that does not capture exceptions.
|
Advice.AdviceVisitor.WithExitAdvice, Advice.AdviceVisitor.WithoutExitAdviceAdvice.Dispatcher.RelocationHandler.Relocation.ForLabel| Modifier and Type | Field and Description |
|---|---|
protected org.objectweb.asm.Label |
returnHandler
Indicates the handler for the value returned by the advice method.
|
argumentHandler, instrumentedMethod, methodExit, methodSizeHandler, methodVisitor, stackMapFrameHandler| Modifier | Constructor and Description |
|---|---|
protected |
WithExitAdvice(org.objectweb.asm.MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Assigner assigner,
StackManipulation exceptionHandler,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Advice.Dispatcher.Resolved.ForMethodEnter methodEnter,
Advice.Dispatcher.Resolved.ForMethodExit methodExit,
List<? extends TypeDescription> postMethodTypes,
int writerFlags,
int readerFlags)
Creates an advice visitor that applies exit advice.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(org.objectweb.asm.MethodVisitor methodVisitor)
Applies this relocator.
|
protected abstract void |
onExitAdviceReturn()
Invoked after the exit advice method has returned.
|
protected void |
onUserEnd()
Writes the advice for completing the instrumented method.
|
protected abstract void |
onUserReturn()
Invoked after the user method has returned.
|
protected void |
onVisitInsn(int opcode)
Visits a simple instruction.
|
onAfterExceptionTable, onUserPrepare, onUserStart, onVisitIincInsn, onVisitVarInsn, visitFrame, visitLocalVariable, visitLocalVariableAnnotation, visitMaxsonVisitFieldInsn, onVisitIntInsn, onVisitInvokeDynamicInsn, onVisitJumpInsn, onVisitLabel, onVisitLdcInsn, onVisitLookupSwitchInsn, onVisitMethodInsn, onVisitMethodInsn, onVisitMultiANewArrayInsn, onVisitTableSwitchInsn, onVisitTypeInsn, visitFieldInsn, visitIincInsn, visitInsn, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTypeInsn, visitVarInsnvisitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLineNumber, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotationprotected final org.objectweb.asm.Label returnHandler
protected WithExitAdvice(org.objectweb.asm.MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Assigner assigner,
StackManipulation exceptionHandler,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Advice.Dispatcher.Resolved.ForMethodEnter methodEnter,
Advice.Dispatcher.Resolved.ForMethodExit methodExit,
List<? extends TypeDescription> postMethodTypes,
int writerFlags,
int readerFlags)
methodVisitor - The method visitor for the instrumented method.implementationContext - The implementation context to use.assigner - The assigner to use.exceptionHandler - The stack manipulation to apply within a suppression handler.instrumentedType - A description of the instrumented type.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.postMethodTypes - A list of virtual method arguments that are available after the instrumented method has completed.writerFlags - The ASM writer flags that were set.readerFlags - The ASM reader flags that were set.public void apply(org.objectweb.asm.MethodVisitor methodVisitor)
methodVisitor - The method visitor to use.protected void onVisitInsn(int opcode)
ExceptionTableSensitiveMethodVisitoronVisitInsn in class ExceptionTableSensitiveMethodVisitoropcode - The opcode of the instruction.protected void onUserEnd()
Advice.AdviceVisitoronUserEnd in class Advice.AdviceVisitorprotected abstract void onUserReturn()
protected abstract void onExitAdviceReturn()
Copyright © 2014–2019. All rights reserved.