title: Calling a method with an arg of Class<T> where T is a parameterized type
body: <p>I'm attempting to call a constructor method that looks like:</p>
  
  <pre><code>public static SomeWrapper&lt;T&gt; method(Class&lt;T&gt; arg);
  </code></pre>
  
  <p>When T is an unparameterized type like String or Integer, calling is straightforward:</p>
  
  <pre><code>SomeWrapper&lt;String&gt; wrapper = method(String.class);
  </code></pre>
  
  <p>Things get tricky when T is a parameterized type like <code>List&lt;String&gt;</code>.  The following is not valid:</p>
  
  <pre><code>SomeWrapper&lt;List&lt;String&gt;&gt; wrapper = method(List&lt;String&gt;.class);
  </code></pre>
  
  <p>About the only thing I could come up with is:</p>
  
  <pre><code>List&lt;String&gt; o = new ArrayList&lt;String&gt;();
  Class&lt;List&lt;String&gt;&gt; c = (Class&lt;List&lt;String&gt;&gt;) o.getClass();
  SomeWrapper&lt;List&lt;String&gt;&gt; wrapper = method(c);
  </code></pre>
  
  <p>Surely there is an easier way that doesn't require the construction of an additional object?</p>