title: How to get type parameter in Java
body: <p>I have an entity as following :</p>
  
  <pre><code>public class Test extends AbstractEntity&lt;Long&gt; implements IHasDate { ... }
  </code></pre>
  
  <p>And it's DAO as following :</p>
  
  <pre><code>public class TestDAO extends AbstractDAO&lt;Test, Long&gt; { ... }
  </code></pre>
  
  <p>In the <code>AbstractDAO</code> I want to test if the passed type parameter Test is an instance of IHasDate.</p>
  
  <p>This is the defintion of the <code>AbstractDAO</code> :</p>
  
  <pre><code>public abstract class AbstractDAO&lt;T extends AbstractEntity&lt;ID&gt;, ID extends Serializable&gt; { 
      public void test(){ 
          // Here I want to test if the passed type parameter is an instance of IHasDate.
      }
  }
  </code></pre>
  
  <p>How can I solve this ?</p>