ninjaframework/ninja — pull request #204 by gitblit (2014-08-01 04:28:15+00:00)
Title: Add type support for primitive & object types: byte, short, char, enum, & arrays

This PR adds support for many of the remaining standard types, including `array[]` combinations of all supported types.

It also introduces a method to register your enum subclasses. Enums must be registered in `conf.Module` to ensure they are available to `NinjaBootstrap` when it builds routes. I use enums quite frequently, and I wanted automatic mapping from request parameters to my enum constants without having to write oodles of ArgumentExtractors.

I added an annotation `@Params` to explicitly use the array type. (?filter=alpha&filter=beta&filter=gamma)
```java
Result doSomething(@Params String [] values)
```
I added implicit support for parsing CSV-formatted query parameters. (?filter=alpha,beta,gama)
```java
Result doSomething(@Param String [] values)
```

I added `@Header` and `@Headers` to inject request headers into your method.
```java
Result doSometing(@Header("user-agent" userAgent)
```

Some of these changes may address parts of #87 - although I have stayed away from proper Collections support, favoring simple and explicit `T[]`.

I have some ideas on supporting `java.util.Date`, `java.sql.Time` and `java.sql.Timestamp`, but I'll leave those for a separate PR.