Suppose I\'m trying to write a function to return an instance of the current type. Is there a way to make T refer to the exact subtype (so T should
T
You should be able to do this using the recursive generic definition style that Java uses for enums:
class A> { T foo(); } class B extends A { @Override B foo(); }