public static interface Advice.PostProcessor
A post processor for advice methods that is invoked after advice is executed. A post processor is invoked after the instrumented method and only after a regular completion of the method. When invoked, the advice method's return value is stored in the local variable array. Upon completion, the local variable array must still be intact and the stack must be empty. A frame is added subsequently to the post processor's execution, making it feasible to add a jump instruction to the end of the method after which no further byte code instructions must be issued. This also applies to compound post processors. If a post processor emits a frame as its last instruction, it should yield a NOP instruction to avoid that subsequent code starts with a frame.
Important: A post processor is triggered after the suppression handler. Exceptions triggered by post processing code will therefore cause those exceptions to be propagated unless the post processor configures explicit exception handling.
Modifier and Type | Interface and Description |
---|---|
static class |
Advice.PostProcessor.Compound
A compound post processor.
|
static interface |
Advice.PostProcessor.Factory
A factory for creating a
Advice.PostProcessor . |
static class |
Advice.PostProcessor.NoOp
A non-operational advice post processor.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Assigner assigner,
Advice.ArgumentHandler argumentHandler,
Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler,
StackManipulation exceptionHandler)
Resolves this post processor for a given instrumented method.
|
StackManipulation resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler, StackManipulation exceptionHandler)
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.assigner
- The assigner to use.argumentHandler
- The argument handler to use.stackMapFrameHandler
- The argument handler for the instrumented method.exceptionHandler
- The exception handler that is resolved for the instrumented method.Copyright © 2014–2024. All rights reserved.