You can't, generics aren't available at runtime. If you had an instance of T, you could always check if T object was an instance of a specific class with instanceof.
This is due to type erasure.
An other way is to use the Class class as a parameter (see @ColinD's answer)