How can I achieve this?
public class GenericClass { public Type getMyType() { //How do I return the type of T? } }
public abstract class AbstractDao { private final Class persistentClass; public AbstractDao() { this.persistentClass = (Class) ((ParameterizedType) this.getClass().getGenericSuperclass()) .getActualTypeArguments()[0]; } }