Closed dtelaroli closed 11 years ago
Have a look at the 1.1.0 release I prepared tonight... let me know what you think!
Perfect solution.
David,
I think that is great add a strategy to invoke a custom constructor from javabean.
Exemple: I have a constructor with args, to final fields:
class MyBean { final String name; MyBean(String name) { this.name = name; } }
I can't use MyBean with proxy because newInstance invoke empty constructor.
Other purpose is to invoke static constructor, like the @Produces in Java CDI: static MyBean construct(String name) { return new MyBean(name); }
What do you think?
Have a look at version 1.2.0 that I just pushed in (documentation on the front page has been updated with instructions)
For future improvements or ideas, I warmly invite you to submit pull requests to the project to contribute! Thanks.
I propose to use setAccessible of Reflection API to permit encapsulating model properties, and no grant direct access, so, the getters and setters should be protected in anyone cases and only grant access by builder. The same for the constructors methods.
What do you think?
Ps. Congratulations for your project.