Package ninja.params
Class ControllerMethodInvoker
- java.lang.Object
-
- ninja.params.ControllerMethodInvoker
-
public class ControllerMethodInvoker extends Object
Invokes methods on the controller, extracting arguments out
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ControllerMethodInvokerbuild(Method functionalMethod, Method implementationMethod, com.google.inject.Injector injector, NinjaProperties ninjaProperties)Builds an invoker for a functional method.Objectinvoke(Object controller, Context context)
-
-
-
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 invokedimplementationMethod- 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 injectorninjaProperties- The NinjaProperties of this application- Returns:
- An invoker
-
-