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 aMethodCall
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MethodCall.TerminationHandler.Factory
A factory for creating a termination handler.static class
MethodCall.TerminationHandler.FieldSetting
A termination handler that sets a field.static class
MethodCall.TerminationHandler.Simple
Simple termination handler implementations.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulation
prepare()
Returns a preparing stack manipulation to apply prior to the method call.StackManipulation
toStackManipulation(MethodDescription invokedMethod, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing)
Returns a stack manipulation that handles the method return.
-
-
-
Method Detail
-
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.
-
-