title: Get type name for generic parameter of generic class
body: <p>I have a small problem in java while using genericity. I have a class <code>A</code> :</p>
  
  <pre><code>public class A&lt;T&gt;
  </code></pre>
  
  <p>In a method of <code>A</code>, I need to get the type name of <code>T</code>.
  Is there a way to find the string <code>s</code> using <code>T</code> ?</p>
  
  <p>(If I create <code>A&lt;String&gt; temp = new A&lt;String&gt;();</code>, I want to be able to get <code>java.lang.String</code> at one point - I have to use genericity because one of my methods will have to return a <code>List&lt;T&gt;</code>).</p>
  
  <p>This seems quite easy but I do not see how to do it.</p>