If you're doing it in a subclass which has it's parent class defining the generic type, this is what worked for me:
// get generic type class name
String name = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0].toString();
// then when you've got the name, you can make the Class object
Class.forName(name.replace("class ", ""))
Reason why I couldn't do it with #getClass()
instead of #toString()
in the first snip is that I was always getting the "Class" class, which is useless to me.