title: Explicitly calling generic method
body: <p>If I have an interface and an implementation:</p>
  
  <pre><code>interface BaseInterface{ }
  class Base implements BaseInterface{ }
  </code></pre>
  
  <p>And somewhere else I have a method:</p>
  
  <pre><code>&lt;T extends Base&gt; T foo() { /* return object of class T */ }
  </code></pre>
  
  <p><code>foo()</code> must be explicitly called with Base in order to assign to the interface. <strong>This works just fine</strong>:</p>
  
  <pre><code>BaseInterface a = &lt;Base&gt;foo();
  </code></pre>
  
  <p>Fine... but how do I explicitly call the following method?</p>
  
  <pre><code>&lt;V extends Base&gt; Map&lt;String, V&gt; bar() { /* return object of Map&lt;String, V&gt; */ }
  </code></pre>
  
  <p>None of these seem to work:</p>
  
  <pre><code>Map&lt;String, ? extends BaseInterface&gt; m = &lt;Base&gt;bar();
  Map&lt;String, ? extends BaseInterface&gt; m = &lt;String, Base&gt;bar();
  Map&lt;String, ? extends BaseInterface&gt; m = &lt;Map&lt;String, Base&gt;&gt;bar();
  </code></pre>