BeanUtil changes - discussion

23 views
Skip to first unread message

Jodders

unread,
Sep 25, 2015, 8:22:26 AM9/25/15
to Jodders
As you maybe know, BeanUtil is a static delegate to the BeanUtilBean. BeanUtil contains many variants methods (like set property in silent and/or forced mode etc).

in 3.7 we would like to add more flags for new features :). There is no sense to add more and more different methods, or new flags in the existing methods.

Instead, we would like to simplify. So: BeanUtilBean becomes a BeanUtil (no longer static methods) with just few setProperty and getProperty methods. And many flags that could be set in fluent way. You can setup BeanUtil instance that you want to use in your code, and use that one for everything. For example:

BeanUtil.create().forced(true).silent(true).setProperty("foo", value);

For simplicity, we will provide 2-3 already preconfigured BeanUtil(Bean) instances (for sillent, forced etc). So the upgrade would be:

+ create your own BeanUtil instance (or use one of provided ones)
+ use it instead of previous BeanUtil.

Its not a big changes - in terms of logic, but it requires every usage to be change.

What do you think?
Reply all
Reply to author
Forward
0 new messages