java how to call superclass method of T (generics)
<p>I have the following method. I would like to find if T has superclass, if so then call the cloneEntity method of the superclass</p>

<pre><code>public Clone(Class&lt;T&gt; typeParameterClass) {
    this.typeParameterClass = typeParameterClass;
}

public T cloneEntity(){
  T clonedEntity = typeParameterClass.newInstance();

  Class superClass = typeParameterClass.getSuperclass();
    if(superClass != null){
        //call clone method of the superclass to copy superclass properties
        ?????????
    }
}
</code></pre>

<p>More explanation</p>

<p>I am not trying to instantiate superclass. I am trying to create an instance of say Address. Address extends BaseEntity and has a deepCopy() method. BaseEntity itself has a deepCopy() method. After creating an instance of Address i want to call the deepCopy() method on Address and then on the superclass BaseEntity</p>

<p>More explanation</p>

<p>I want to get rid of the deepCopy() method in each object like Address, User etc and create a generic one. Hence T could be Address or User, But I would like to call the superclass of T in the generic implementation</p>
