title: How to pass Class variable of generic type in Java?
body: <p>I have a function that expects class</p>
  
  <pre><code>someMethod(Class&lt;T&gt; c){}
  </code></pre>
  
  <p>which for a normal class it's easy, you can just do </p>
  
  <pre><code>someMethod(MyObject.class)
  </code></pre>
  
  <p>But for some reason this wont work</p>
  
  <pre><code> someMethod(MyObject&lt;User&gt;.class)
  </code></pre>
  
  <p>wont compile. Why?</p>