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.WithoutExitAdvice| Modifier and Type | Field and Description |
|---|---|
protected boolean |
doesReturn
true if the advice method ever returns non-exceptionally. |
protected Label |
returnHandler
Indicates the handler for the value returned by the advice method.
|
instrumentedMethod, methodExit, methodSizeHandler, methodVisitor, stackMapFrameHandlerapi, mv| Modifier | Constructor and Description |
|---|---|
protected |
WithExitAdvice(MethodVisitor methodVisitor,
MethodDescription.InDefinedShape instrumentedMethod,
Advice.Dispatcher.Resolved.ForMethodEnter methodEnter,
Advice.Dispatcher.Resolved.ForMethodExit methodExit,
List<? extends TypeDescription> yieldedTypes,
ClassFileVersion classFileVersion,
int writerFlags,
int readerFlags)
Creates an advice visitor that applies exit advice.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(MethodVisitor methodVisitor)
Applies this skip handler.
|
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, variable, variable, 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, visitVarInsnvisitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLineNumber, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotationprotected final Label returnHandler
protected boolean doesReturn
true if the advice method ever returns non-exceptionally.protected WithExitAdvice(MethodVisitor methodVisitor, MethodDescription.InDefinedShape instrumentedMethod, Advice.Dispatcher.Resolved.ForMethodEnter methodEnter, Advice.Dispatcher.Resolved.ForMethodExit methodExit, List<? extends TypeDescription> yieldedTypes, ClassFileVersion classFileVersion, int writerFlags, int readerFlags)
methodVisitor - The method visitor for the instrumented method.instrumentedMethod - A description of the instrumented method.methodEnter - The dispatcher to be used for method entry.methodExit - The dispatcher to be used for method exit.yieldedTypes - The types that are expected to be added after the instrumented method returns.classFileVersion - The instrumented type's class file version.writerFlags - The ASM writer flags that were set.readerFlags - The ASM reader flags that were set.public void apply(MethodVisitor methodVisitor)
Advice.Dispatcher.Bound.SkipHandlermethodVisitor - The method visitor to write the code to.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–2016. All rights reserved.