Class MethodReplaceStrategyImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Method method  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void with​(java.lang.reflect.InvocationHandler invocationHandler)
      Replaces the method invocation with an invocation handler
      void with​(java.lang.reflect.Method method)
      Replaces the method invocation with this method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • method

        private final java.lang.reflect.Method method
    • Constructor Detail

      • MethodReplaceStrategyImpl

        public MethodReplaceStrategyImpl​(java.lang.reflect.Method method)
    • Method Detail

      • with

        public void with​(java.lang.reflect.Method method)
        Description copied from interface: MethodReplaceStrategy
        Replaces the method invocation with this method.

        Note that both methods needs to be static.

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

        public void with​(java.lang.reflect.InvocationHandler invocationHandler)
        Description copied from interface: MethodReplaceStrategy
        Replaces the method invocation with an invocation handler
        Specified by:
        with in interface MethodReplaceStrategy
        Parameters:
        invocationHandler - The invocation handler to replace the method call with.