title: Get classname of type used with extends ArrayList<T>?
body: <p>I have the following:</p>
  
  <pre><code>public class Foo&lt;T extends Grok&gt; extends ArrayList&lt;T&gt; {
  
  }
  </code></pre>
  
  <p>How can I find the class name represented by T at runtime? For instance, let's say I allocate like this:</p>
  
  <pre><code>Foo&lt;Apple&gt; foo = new Foo&lt;Apple&gt;();
  </code></pre>
  
  <p>Is there a way I can get Apple as the class name used in the constructor of Foo?:</p>
  
  <pre><code>public Foo() {
      super();
  
      String classname = this.getTypeClassName(); // "com.me.Apple"
  }
  </code></pre>
  
  <p>I could just add a method to set the classname, but would prefer to fetch it internally so the user doesn't have to do it,</p>
  
  <p>Thank you</p>