Groovy like map constructor
I miss so much the Groovy like map constructor in Java that I have created my own.
The copyProperties helper is a simple wrapper around Jakarta commons-beanutils implementation to eliminate useless checked exception handling.
Why is it useful:
- when you fed up with enforced Java bean convention. Everyone knows how useless that convention but you have no other choice because frameworks are expecting. E.g.: It is not possible to replace getters/setter by public fields.
- Simplify test code
- the whole bean initialization is still centralized in constructor.
Apr 13, 2014
comments powered by Disqus