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{
....
This is not possible in Java, but you might wonder what the use-case is to force this in the interface.
List. And since you program against that specific class, the compiler has access to that specific return type and knows about it