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{ ....
Maybe sth like this
public interface Bar { .... List extends Bar> getFoo(); } public class T implements Bar { List getFoo(); } public class TestClass extends T {};