We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interface BeanFactory { <T> create(Context ctx, Class<T> type); }
With:
{ install(new ModelBeanFactory()); get("/bean", ctx -> { var person = ctx.query(Person.class); }); }
Or:
class Controller { @GET public Person bean(@QueryParam Person person) { } }
The [Model]BeanFactory will be generated by jooby-apt and will looks like:
[Model]BeanFactory
class ModelBeanFactory implements BeanFactory { <T> create(Context ctx, Class<T> type) { if (type == Person.class) { return createPerson(ctx); } throw new Unsupported(); } Person createPerson(Context ctx) { var value = new Person(); value.setName(ctx.lookup("name").value()); return value; } }
TBD: How the processor find these beans? Should we introduce a new annotation? package/class name matches?
NOTE 1: I would like to introduce it for 3.x. On 4.x remove the reflective bean converter.
NOTE: This is the last step on removing reflection from jooby (core).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With:
Or:
The
[Model]BeanFactory
will be generated by jooby-apt and will looks like:TBD: How the processor find these beans? Should we introduce a new annotation? package/class name matches?
NOTE 1: I would like to introduce it for 3.x. On 4.x remove the reflective bean converter.
NOTE: This is the last step on removing reflection from jooby (core).
The text was updated successfully, but these errors were encountered: