title: Java clone() method using new keyword and a copy constructor instead of super.clone()
body: <p>When searching the net for possibilities how to make a deep copy of an object polymorphically, I found a <a href="http://www.agiledeveloper.com/articles/cloning072002.htm" rel="nofollow">solution</a> that claims to solve many issues with the <code>clone()</code> method, e.g. the impossibility to clone <code>final</code> fields. The solution combines the use of a protected copy constructor inside the <code>clone()</code> implementation and basically goes like this (example copied from the referenced page):</p>
  
  <pre><code>public class Person implements Cloneable
  {
      private final Brain brain; // brain is final since I do not want 
                                 // any transplant on it once created!
      private int age;
  
      public Person(Brain aBrain, int theAge)
      {
          brain = aBrain; 
          age = theAge;
      }
  
      protected Person(Person another)
      {
          Brain refBrain = null;
          try
          {
              refBrain = (Brain) another.brain.clone();
              // You can set the brain in the constructor
          }
          catch(CloneNotSupportedException e) {}
          brain = refBrain;
          age = another.age;
      }
  
      public Object clone()
      {
          return new Person(this);
      }
  
      …
  }
  </code></pre>
  
  <p>The <code>clone()</code> method of <code>Brain</code> may be implemented in a similar way.</p>
  
  <p>Based on the <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#clone%28%29" rel="nofollow">documentation of the <code>clone()</code> method</a>, it seems that all "contracts" of this method 'are not absolute requirements' and that 'the returned object should be obtained by calling <code>super.clone()</code>' is just a convention.</p>
  
  <p>So, is this implementation actually incorrect? Why?</p>
  
  <p>And if it is correct, why it did not become a design pattern? What are the downsides of this???</p>
  
  <p>Thanks, Petr</p>