How do I enforce that the method getFoo() in the implementing class, returns a list of the type of same implementing class.
public interface Bar{ ....
I liked yshavit answer best but I could not understand the code. So I will try to write the code as I think it should be.
interface Bar { // stuff // don't bother with the getFoo method } interface BarUtils { < T extends Bar > List < ? extends T > getFoo ( T bar ) ; }