ninjaframework/ninja — pull request #160 by gakuzzzz (2014-03-25 04:02:27+00:00)
Title: Add Generic Type Information into ArgumentExtractor and Make core configuration customizable

Hi,

Thank you for awesome framework!

### I want to do

1. use generic types (ex. `Optional>`) in `Controller` method arguments.
1. Using javac option `-parameters` in JavaSE8, associate `Controller` method arguments with request parameter names or path parameter names.
- this function needs JavaSE8. so It is enough, if the function is provided with plug-in.
1. (optional) make framework user enable to custom the behavior when `@PathParam` or `@Param` is ommited

### Problems

1. `ArgumentExtractor` can not use generic type information since `ArgumentClassHolder` has only `java.lang.Class`
1. `ArgumentExtractor` can not access `Method` instance and the index of parameters.
1. Since [ControllerMethodInvoker.build](https://github.com/ninjaframework/ninja/blob/ninja-3.1.3/ninja-core/src/main/java/ninja/params/ControllerMethodInvoker.java#L69) is static method, it can not change in configuration.
1. It can not override `ninja.Configuration` bindings.

### Requests

This PR contains below. but, there are more better solutions, teach me them please.

1. Add `java.lang.reflect.Type` into `ArgumentClassHolder`.
1. [In `ArgumentExtractor` construction](https://github.com/ninjaframework/ninja/blob/ninja-3.1.3/ninja-core/src/main/java/ninja/params/ControllerMethodInvoker.java#L238-L244), the child injector binds `Method` instance and the index of parameters.
1. Create `ControllerMethodInvokerBuilder` and Remove the static `ControllerMethodInvoker.build`.
1. Make `ninja.Configuration` enable to oberride by defining `conf.OverrideCoreModule`