Package net.bytebuddy.implementation
Interface MethodCall.TerminationHandler
- All Known Implementing Classes:
MethodCall.TerminationHandler.FieldSetting
,MethodCall.TerminationHandler.Simple
- Enclosing class:
- MethodCall
protected static interface MethodCall.TerminationHandler
A termination handler is responsible to handle the return value of a method that is invoked via a
MethodCall
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A factory for creating a termination handler.static class
A termination handler that sets a field.static enum
Simple termination handler implementations. -
Method Summary
Modifier and TypeMethodDescriptionprepare()
Returns a preparing stack manipulation to apply prior to the method call.toStackManipulation
(MethodDescription invokedMethod, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing) Returns a stack manipulation that handles the method return.
-
Method Details
-
prepare
StackManipulation prepare()Returns a preparing stack manipulation to apply prior to the method call.- Returns:
- The stack manipulation to apply prior to the method call.
-
toStackManipulation
StackManipulation toStackManipulation(MethodDescription invokedMethod, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing) Returns a stack manipulation that handles the method return.- Parameters:
invokedMethod
- The method that was invoked by the method call.instrumentedMethod
- The method being intercepted.assigner
- The assigner to be used.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.- Returns:
- A stack manipulation that handles the method return.
-