Unlike other answers, you can get the type of the general parameter. For example, adding this to a method inside a universal class, you get the first general parameter of the class ( T in your case):
ParameterizedType type = (ParameterizedType) getClass().getGenericSuperclass(); type.getActualTypeArguments()[0]
I use this technique in general Hibernate DAO, which I wrote to get a real class that is saved because Hibernate needs it. He works!
Single shot
source share