title: Type parameter T is not within its bound; should extend MyBaseClass
body: <p>I'm dealing with some legacy code, trying to refactor and extract common code. I've ended up with the following hierarchy.</p>
  
  <pre><code>public interface MyInterface&lt;T extends MyBaseClass&gt; {...}
  public class MyBaseClass {...}
  public class MyClass extends MyBaseClass implements MyOtherInterface&lt;MyClass&gt; {...}
  
  public interface MyOtherInterface&lt;T extends MyOtherInterface&lt;T&gt;&gt; {
      void func(MyInterface&lt;T&gt; context);  // Complains that T should extend MyBaseClass
  }
  </code></pre>
  
  <p>In words, I want to specify that the parameter T passed to MyOtherInterface should be a class that extends MyBaseClass and implements MyOtherInterface. Something like this:</p>
  
  <pre><code>public interface MyOtherInterface&lt;T extends MyOtherInterface&lt;T extends MyBaseClass&gt;&gt;
  </code></pre>
  
  <p>How can I do this? I am trying to change as little as possible. I am not sure the above is possible and I might have to actually flip the hierarchy.</p>