I had this problem in an abstract generic class. In this particular case, the solution is simpler:
abstract class Foo {
abstract Class getTClass();
//...
}
and later on the derived class:
class Bar extends Foo {
@Override
Class getTClass() {
return Whatever.class;
}
}