deep cloning an object via interfaces?

E

Elhanan

hi

i'm have a tree of simple beans. this tree should pupoulated from an
xml data source which is VERY different structure, so no xml binding or
xsl would do the trick.

i was thinking of creating a tree of adapters which will implement the
same interface as the tree of beans, so externally there should be no
difference.

i then thought of using some sort of clone method which will simply go
though each getter and place it in new objetct's setter, the commons
copyProperties method almost does this, but it only does shallow copies
of collections (so i have to create a method what willl go through each
item in a collection an use it's clone method as well.

any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top