title: Creating instances of public inner classes of generic classes
body: <p>So I have something like the following:</p>
  
  <pre><code>public class Enclosing&lt;T extends Comparable&lt;T&gt;&gt; {
      // non-relevant code snipped
      public class Inner {
          private T value;
          public Inner(T t) {
              value = t;
          }
      }
  }
  </code></pre>
  
  <p>Everything compiles and the world is happy. However, whenever I try to create an instance of <code>Enclosing.Inner</code> as follows, I can't:</p>
  
  <pre><code>new Enclosing&lt;Integer&gt;.Inner(5);
  </code></pre>
  
  <p>The following error happens:</p>
  
  <blockquote>
    <p>Cannot allocate the member type <code>Enclosing&lt;Integer&gt;.Inner</code> using a parameterized compound name; use its simple name and an enclosing instance of type <code>Enclosing&lt;Integer&gt;</code>.</p>
  </blockquote>
  
  <p>It is important to note that I cannot make the inner class <code>static</code>, because it contains a field of type <code>T</code>.</p>
  
  <p>How can I work around this?</p>