title: Java pass a list type to a generic method?
body: <p>I have written the following method that takes a generic type. How do i pass a list of type Order as the response type?</p>
  
  <pre><code>public &lt;T&gt; ServiceResponse&lt;T&gt; fetchGet(String url, Class&lt;T&gt; responseType, boolean authRequired);
  
  // This works just fine
  fetchGet("MY_URL", Order.class, true);
  
  // How do i pass a list?
  fetchGet("MY_URL", List&lt;Order&gt;.class, true);
  </code></pre>