Results 1 to 2 of 2
  1. #1
    simon is offline Member
    Join Date
    Jul 2007
    Rep Power

    Default How to clone a JAXB object ?

    how can I clone a JAXB object? There aren't any function in the utility classes or object factories.
    any ideas?
    Do I need to add something to the xsd or xjb file to tell it to add cloning support for the jaxb objects?

  2. #2
    christina is offline Member
    Join Date
    Jul 2007
    Rep Power


    For cloning classes that are based on auto-generated source code that you cannot edit, cloning based on reflection might be the best approach. It does not require the classes to be declared Serializable or Cloneable and the performance it generally better than cloning via serialization (sometimes much better). It does, however, require sufficient security privileges in order to manipulate non-public class fields.

Similar Threads

  1. How to clone an Array
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 09:46 PM
  2. An nslookup clone in Java
    By Java Tip in forum
    Replies: 0
    Last Post: 04-07-2008, 09:12 PM
  3. clone method
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 01-30-2008, 10:47 AM
  4. clone method
    By gapper in forum New To Java
    Replies: 1
    Last Post: 01-20-2008, 09:46 AM
  5. clone problem
    By feniger in forum New To Java
    Replies: 13
    Last Post: 01-13-2008, 11:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts