deep cloning an object via interfaces?

Discussion in 'Java' started by Elhanan, Dec 27, 2006.

  1. Elhanan

    Elhanan Guest

    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?
     
    Elhanan, Dec 27, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neven Klofutar

    Deep cloning

    Neven Klofutar, Jul 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    =?Utf-8?B?bG9uZG9uIGNhbGxpbmc=?=
    Jul 7, 2005
  2. Joris Bleys

    deep cloning for container class

    Joris Bleys, Jul 31, 2003, in forum: Java
    Replies:
    1
    Views:
    766
    Joris Bleys
    Jul 31, 2003
  3. Joris Bleys
    Replies:
    3
    Views:
    368
    Tim Tyler
    Aug 19, 2003
  4. Rajinder Yadav

    deep cloning, how?

    Rajinder Yadav, Oct 14, 2009, in forum: Ruby
    Replies:
    28
    Views:
    299
    Robert Klemme
    Oct 20, 2009
  5. Replies:
    0
    Views:
    185
Loading...

Share This Page