In java, can I do something -more or less- like this? and how?
public class SomeGenericClass<T> extends T{
}
I think this is the relevant quote from the JLS (§8.1.4):
The ClassType [provided in the
extends
clause] must name an accessible (§6.6) class type, or a compile-time error occurs.
(The bit about accessibility isn't relevant).
A class type is not the same thing as a type variable (§4.3) (which T
is), so attempting to do this would be a compile-time error.