title: Is it possible to reference a nested generic parameter in java?
body: <p>I'm not sure what the technical term for this is, but consider an interface:</p>
  
  <pre><code>public interface SomeInterface&lt;T&gt; {
       public T doSomething();
  }
  </code></pre>
  
  <p>And then a second interface:</p>
  
  <pre><code>public interface SomeRelatedInterface&lt;T, D extends SomeInterface&lt;T&gt;&gt; {
       public T doSomethingRelated(D relative);
  }
  </code></pre>
  
  <p>Is it possible to craft the second interface to only require one generic parameter, and then have the doSomethingRelated method implicitly extract the return type in its declaration. This is not legal, but this is what I am wondering if can be done in some other means:</p>
  
  <pre><code>public interface &lt;T&gt; SomeRelatedInterface&lt;D extends SomeInterface&lt;T&gt;&gt; {
       public T doSomethingRelated(D relative);
  }
  </code></pre>
  
  <p>EDIT (On posting the bounty): At this point what I am looking for on this question is the reason that the language requires this duplication. That is what has been missing from the answers until now to get one accepted.</p>