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.
  • Method Details

    • 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.