Interface MethodReplaceStrategy

All Known Implementing Classes:
MethodReplaceStrategyImpl

public interface MethodReplaceStrategy
Specifies the replace strategy for a method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    with(InvocationHandler invocationHandler)
    Replaces the method invocation with an invocation handler
    void
    with(Method method)
    Replaces the method invocation with this method.
  • Method Details

    • with

      void with(Method method)
      Replaces the method invocation with this method.

      Note that both methods needs to be static.

      Parameters:
      method - The method call will be replaced by this method instead. Needs to be static.
    • with

      void with(InvocationHandler invocationHandler)
      Replaces the method invocation with an invocation handler
      Parameters:
      invocationHandler - The invocation handler to replace the method call with.