I want to copy some fields from one java object to other java object dynamically. Classes of these objects are different.
Below is the scenario
I have some resource classes with some fields. There are few fields in each class which can be modified by user but these fields are not same in all the resource classes. List of modifiable fields for each class is being maintained in some data structure.
Most of the fields are similar and some are convertible like one has primitive and other has wrapper class. Some fields should be converted from Number types to String or vise versa as well.
Most of the fields are complex object types.
Which of the libraries available today will help me copying these fields with auto-conversion where ever required and deep copy ? Earlier I was using BeanUtils but this does not deep copy. Neither it supports auto conversion.
Aucun commentaire:
Enregistrer un commentaire