Package ninja.params

Class ControllerMethodInvoker


  • public class ControllerMethodInvoker
    extends Object
    Invokes methods on the controller, extracting arguments out
    • Method Detail

      • build

        public static ControllerMethodInvoker build​(Method functionalMethod,
                                                    Method implementationMethod,
                                                    com.google.inject.Injector injector,
                                                    NinjaProperties ninjaProperties)
        Builds an invoker for a functional method. Understands what parameters to inject and extract based on type and annotations.
        Parameters:
        functionalMethod - The method to be invoked
        implementationMethod - The method to use for determining what actual parameters and annotations to use for each argument. Useful when type/lambda erasure makes the functional interface not reliable for reflecting.
        injector - The guice injector
        ninjaProperties - The NinjaProperties of this application
        Returns:
        An invoker