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 Label |
endOfMethod
A label that indicates the end of the method.
|
instrumentedMethod, methodExit, methodSizeHandler, stackMapFrameHandler
api, 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 |
---|---|
protected abstract void |
onAdviceExit()
Invoked on completing the inlining of the exit advice.
|
protected abstract void |
onMethodExit()
Invoked on completing the method's code.
|
protected void |
onUserEnd()
Writes the advice for completing the instrumented method.
|
protected abstract void |
onUserExit()
Invoked on completing to write the translated user code.
|
protected abstract void |
onUserReturn()
Invoked when the user method issues a return statement before applying the exit handler.
|
protected void |
onVisitInsn(int opcode)
Visits a simple instruction.
|
onAfterExceptionTable, onUserPrepare, onUserStart, onVisitIincInsn, onVisitVarInsn, variable, variable, visitFrame, visitMaxs
onVisitFieldInsn, 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, visitVarInsn
visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitInsnAnnotation, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation
protected final Label endOfMethod
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.protected void onVisitInsn(int opcode)
ExceptionTableSensitiveMethodVisitor
onVisitInsn
in class ExceptionTableSensitiveMethodVisitor
opcode
- The opcode of the instruction.protected void onUserEnd()
Advice.AdviceVisitor
onUserEnd
in class Advice.AdviceVisitor
protected abstract void onUserReturn()
protected abstract void onUserExit()
protected abstract void onAdviceExit()
protected abstract void onMethodExit()
Copyright © 2014–2016. All rights reserved.