title: A typedef in Java, for array types in particular
body: <p>I'm building a graphing GIO and have the following interface:</p>
  
  <pre><code>public interface GraphModel
  {
      public java.util.List&lt;java.awt.geom.Point2D[]&gt; getLayers();
      ...
  }
  </code></pre>
  
  <p>But I find the fact that I have to use <code>java.awt.geom.Point2D[]</code> particularly loathsome as it will appear in a whole load of other interface functions. What I want to do is:</p>
  
  <pre><code>public interface GraphModel
  {
      public class LayerType extends java.awt.geom.Point2D[]{};
      public java.util.List&lt;LayerType&gt; getLayers();
      ...
  }
  </code></pre>
  
  <p>But this is not good since (i) you can't extend an array like this, and (ii) I question the wisdom of creating a dummy class just to model a language feature (the C++ <code>typedef</code>) that Java doesn't have.</p>
  
  <p>Am I missing something here? Perhaps something with generics but then I effectively lose <em>all</em> type information.</p>