title: Modern day alternatives to Cloneable?
body: <p>It is well-known that <code>Cloneable</code> is broken beyond repair (see the discussion <a href="https://stackoverflow.com/questions/26398951/why-is-cloneable-not-deprecated">in this question</a> for more information).</p>
  
  <p>Last questions on alternatives and "how do I do it right" are few years old:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/791787/are-there-any-alternatives-to-implementing-clone-in-java">Are there any alternatives to implementing Clone in Java?</a></li>
  <li><a href="https://stackoverflow.com/questions/2326758/how-to-properly-override-clone-method">How to properly override clone method?</a></li>
  <li><a href="https://stackoverflow.com/questions/2427883/clone-vs-copy-constructor-which-is-recommended-in-java">Clone() vs Copy constructor- which is recommended in java</a></li>
  <li><a href="https://stackoverflow.com/questions/1106102/clone-vs-copy-constructor-vs-factory-method">clone() vs copy constructor vs factory method?</a></li>
  <li><a href="https://stackoverflow.com/questions/13408202/polymorphic-copy-in-java">Polymorphic copy in Java</a></li>
  <li><a href="https://stackoverflow.com/questions/4199429/proper-way-to-deep-copy-with-copy-constructor-instead-of-object-clone">Proper way to deep copy with copy constructor instead of Object.clone</a></li>
  </ul>
  
  <p>So I'd like to ask again:</p>
  
  <p><strong>What are the modern day (2014) alternatives to <code>Cloneable</code>?</strong></p>
  
  <p>I am looking for a general-purpose solution. I could imagine the following requirements:</p>
  
  <ul>
  <li>Some kind of <code>Copyable</code> interface which the classes will implement: <code>A extends Copyable</code>.</li>
  <li>Deep copying. If an istance of <code>A</code> references an instance of <code>B</code>, <code>a.copy()</code> should reference a new <code>b.copy()</code>.</li>
  <li>Copy to the specified target: <code>a.copyTo(a1)</code>.</li>
  <li>Polymorphic copying: if <code>B</code> extends <code>A</code> then <code>a.copyTo(b)</code> should copy all the properties of <code>B</code> from <code>a</code> to <code>b</code>.</li>
  </ul>
  
  <p>Of course I can implement all of this by myself, but wouldn't it be reasonable to have standard interfaces for this? Or am I missing something?</p>
  
  <hr>
  
  <p>A bit of the background for my context. I'm working a lot with JAXB and schema-derived classes. It is often extremely useful to have deep copying for these classes. Few years ago I wrote a couple of JAXB schema compiler plugins to generate <code>copyTo</code> methods which implement the requirements above (and more). I had to use my own runtime API. Now I was revisiting the case and decided to ask if there's a standard solution.</p>