title: How do I get class type of generic list?
body: <p>I have this method</p>
  
  <pre><code>public &lt;T&gt; T PostQuery(String url, Object graph, Class&lt;T&gt; returnType)
  </code></pre>
  
  <p>and I want to call it like this </p>
  
  <pre><code>List&lt;User&gt; users = PostQuery("blabla", SomeObj, List&lt;User&gt;.class);
  </code></pre>
  
  <p>But I get error on the last argument. It allows me to only write <code>List.class</code>, which makes it a list of strings, not what I want. </p>
  
  <p>How can I do that?</p>