title: How do I get a class instance of generic type T?
body: <p>I have a generics class, <code>Foo&lt;T&gt;</code>. In a method of <code>Foo</code>, I want to get the class instance of type <code>T</code>, but I just can't call <code>T.class</code>.</p>
  
  <p>What is the preferred way to get around it using <code>T.class</code>?</p>