Cannot find type parameter if it is an inner class of the subclass in Java
<p>Why does the following code have a compile error:</p>

<p>Foo.java:</p>

<pre><code>public abstract class Foo&lt;T&gt; {
    public abstract T getInner();
}
</code></pre>

<p>MyFoo.java:</p>

<pre><code>public class MyFoo extends Foo&lt;MyFooInner&gt; {
    public static class MyFooInner {
    }
    public MyFooInner getInner() {
        return new MyFooInner();
    }
}
</code></pre>

<p>Compiling the second class results in:</p>

<pre><code>MyFoo.java:1: cannot find symbol
symbol: class MyFooInner
public class MyFoo extends Foo&lt;MyFooInner&gt; {
                               ^
1 error
</code></pre>

<p>Is there a way around this problem besides putting the inner class in its own file?</p>
