/** See [Controller.box] */
app.get("/box", this::box)
.setReturnType(io.jooby.Reified.getParameterized(foo.Box::class.java, Int::class.java).getType())
.setMvcMethod(Controller::class.java.getMethod("box", foo.Box::class.java))
Which results in a runtime exception:
[2024-08-03 11:57:40,773]-[main] ERROR io.jooby.Jooby - Application initialization resulted in exception
java.lang.IllegalArgumentException: Not a primitive type: int
at jars//io.jooby.internal.reflect.$Types.checkNotPrimitive($Types.java:385)
at jars//io.jooby.internal.reflect.$Types$ParameterizedTypeImpl.<init>($Types.java:429)
at jars//io.jooby.internal.reflect.$Types.newParameterizedTypeWithOwner($Types.java:43)
at jars//io.jooby.Reified.getParameterized(Reified.java:229)
at kotlin-new-apt//app.Controller_.install(Controller_.kt:70)
at jars//io.jooby.Jooby.mvc(Jooby.java:533)
Given:
Generates:
Which results in a runtime exception: