title: How can I return a list of a certain type when calling a generic method that accepts a Class<T> and returns a T?
body: <p>I'm calling a method from a library with this signature:</p>
  
  <pre><code>public &lt;T&gt; T get(Class&lt;T&gt; c)
  </code></pre>
  
  <p>And I'd like to get a <code>List&lt;MyClass&gt;</code> as a return value.  But calling it like this does not compile ("Cannot select from parameterized type"):</p>
  
  <pre><code>List&lt;MyClass&gt; myClasses = get(List&lt;MyClass&gt;.class);
  </code></pre>
  
  <p>This compiles, but gives a warning:</p>
  
  <pre><code>List&lt;MyClass&gt; myClasses = get(List.class);
  </code></pre>
  
  <p>The warning says "Unchecked Assignment".  How can I avoid this warning and avoid casting my list?</p>