title: Enforcing return type for an class that implements an interface
body: <p>How do I enforce that the method getFoo() in the implementing class, returns a list of the type of same implementing class.</p>
  
  <pre><code>public interface Bar{
       ....
       List&lt;? extends Bar&gt; getFoo(); 
  }
  </code></pre>
  
  <p>Right now a class that implements Bar returns objects of any class that implements Bar. I want to make it stricter so that the class that implements Bar returns a List of objects of only its type in getFoo().</p>