Elia Bolg wrote:I was under the impression that when you extend the abstract class, you provide the type T (Config as in my example)
That's one way to do it, yes.
so in turn the entityClass would be : private Config entityClass; I'm not getting the Class<T> in this case.
Forget about extending. And mostly forget about generics for a minute. Just think about what Class<T> vs. T means.
Class<T> means java.lang.Class, where the Class object is the one representing the class T. It might be Class<
String> for the String class, or class<com.mypackage.MyFooBar> for the MyFooBar class. But it's always java.lang.class.
T, on the other hand, is whatever class you want it to be. It might be String, or it might be comp.mypakcage.MyFooBar.
Now consider what you can do with a Class object vs. what you can do with a String or MyFooBar object. Consider what the difference is between have a variable
Class x; and [b]MyFooBar x;[/t]
As to
why that class is using Class<T> rather than just T, you'd have to look at the rest of the class and see how it uses that variable.