title: Why can't I define interface for overlay type lightweight collections?
body: <p>I want to define an interface for lightweight collections as blow, but it can't be compiled successfully. Any mistake here? </p>
  
  <pre><code>//...........................Interface...........................................
  
  @SingleJsoImpl(JsArrayExtImpl.class)
  public interface JsArrayExt&lt;M&gt;{
  
          public  void add(int addBefore, M model) ;
  
          public  void add(M model) ;
  
          public  void addAll(JsArrayExt&lt;M&gt; models);
  }
  
  
  //................................Implementation
  
  public class JsArrayExtImpl&lt;M extends JavaScriptObject&gt; extends JsArray&lt;M&gt; implements    JsArrayExt&lt;M&gt;
  {
    protected JsArrayExtImpl()
    {
    }
  
    @Override
    public final native void add(int addBefore, M model) /*-{
      this.splice(addBefore, 0, model);
    }-*/;
  
    @Override
    public final void add(M model)
    {
      ...
    }
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Exception in thread "Code server for gwttest from Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 on ...GWTTest.html?gwt.codesvr=127.0.0.1:9997 @ SR;E74|oFVbz;?F%" java.lang.NullPointerException
  at com.google.gwt.dev.shell.ModuleSpace.dispose(ModuleSpace.java:146)
  at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:215)
  at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
  at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
  at java.lang.Thread.run(Thread.java:722)`
  </code></pre>