Why Object.clone() is able to "see" fields defined in subclasses?
<p>I was wandering how can Object.Clone() access field fields that are actually defined in the subclasses, and not the actual implementation of this feature.</p>

<p>What is bothering me is that I cannot see the logic to allow base class (even if it is "special") to access the fields defined in the subclasses - doesn't this breaks whole object inheritance concept?</p>

<p>Consider this:</p>

<pre><code>class Test implements Cloneable
{
    private String test_field;

    public Test()
    {
    }

    public Test clone() throws CloneNotSupportedException
    {
       return (Test)super.clone();
    }
}
</code></pre>

<p>Here, calling <code>Test.clone()</code> will copy the <code>test_field</code> also. Things are even getting weirder for me when it comes to the situation where <code>Test</code> is declared as an abstract class - calling <code>clone()</code> will allow me (in some way) to get the instance of the abstract class.</p>
