I have the following class
public class MyClass<T> { public Class<T> getDomainClass() { GET THE CLASS OF T } }
I searched for this problem and all the answers that I could find told me to use getGenericSuperClass (), but the problem with this method is that I have to have a second class that extends MyClass and I don't want to do this, I need to get the parameterized type of a particular class?
java generics reflection
Guidomb
source share