I have a generics class, Foo. In a method of Foo, I want to get the class instance of type T, but I just can\'t call T.
Foo
T
T.
You can't do it because of type erasure. See also Stack Overflow question Java generics - type erasure - when and what happens.