Finding what type of class
<p>I have three class  ClassA , ClassB, ClassC. All the three classes implements "ClassInterface" interface .</p>

<pre><code>class ClassA&lt;T&gt; implements ClassInterface&lt;T&gt;{}

class ClassB&lt;T&gt; implements ClassInterface&lt;T&gt;{}

class ClassC&lt;T&gt; implements ClassInterface&lt;T&gt;{} 
</code></pre>

<p>I have method in other class ClassD:</p>

<pre><code>void methodname(ClassInterface&lt;T&gt; CI[]){}
</code></pre>

<p>in the method I need to find to which class each element belong to ? i.e whether CI[i] belong to ClassA, ClassB or ClassC?</p>

<p>I tried "instacneof" but it giving me errors. I don't know whether  my approach is correct or not</p>
