protected static class Advice.AdviceVisitor.WithExceptionHandling extends Advice.AdviceVisitor
Advice.AdviceVisitor.CodeCopier, Advice.AdviceVisitor.WithExceptionHandling, Advice.AdviceVisitor.WithoutExceptionHandling
instrumentedMethod
api, mv
Modifier | Constructor and Description |
---|---|
protected |
WithExceptionHandling(MethodVisitor methodVisitor,
MethodDescription.InDefinedShape instrumentedMethod,
Advice.Dispatcher.Resolved.ForMethodEnter methodEnter,
Advice.Dispatcher.Resolved.ForMethodExit methodExit,
byte[] binaryRepresentation)
Creates a new advise visitor that captures exception by weaving try-catch blocks around user code.
|
Modifier and Type | Method and Description |
---|---|
protected void |
onMethodEnd()
Writes the advise for completing the instrumented method.
|
protected void |
onMethodExit()
Writes the advise for exiting the instrumented method.
|
protected void |
onMethodStart()
Writes the advise for entering the instrumented method.
|
String |
toString() |
appendEnter, appendExit, variable, variable, visitCode, visitInsn, visitMaxs, visitVarInsn
visitAnnotation, visitAnnotationDefault, visitAttribute, visitEnd, visitFieldInsn, visitFrame, visitIincInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn
protected WithExceptionHandling(MethodVisitor methodVisitor, MethodDescription.InDefinedShape instrumentedMethod, Advice.Dispatcher.Resolved.ForMethodEnter methodEnter, Advice.Dispatcher.Resolved.ForMethodExit methodExit, byte[] binaryRepresentation)
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.binaryRepresentation
- The binary representation of the advise methods' class file.protected void onMethodStart()
Advice.AdviceVisitor
onMethodStart
in class Advice.AdviceVisitor
protected void onMethodExit()
Advice.AdviceVisitor
onMethodExit
in class Advice.AdviceVisitor
protected void onMethodEnd()
Advice.AdviceVisitor
onMethodEnd
in class Advice.AdviceVisitor
Copyright © 2014–2016. All rights reserved.