I have a generic class, says :
MyClass
Inside a method of this class, I would like to test the type of T, for example :
Additionally to cletus one exception I've mine: super type tokens. The super type token will preserve the type information.
new Type>() {}
The type information can be retrieved with Class.getGenericSuperClass.