我想为轻量级集合定义一个接口为打击,但无法成功编译。这里有什么错误吗?
//...........................Interface...........................................
@SingleJsoImpl(JsArrayExtImpl.class)
public interface JsArrayExt<M>{
public void add(int addBefore, M model) ;
public void add(M model) ;
public void addAll(JsArrayExt<M> models);
}
//................................Implementation
public class JsArrayExtImpl<M extends JavaScriptObject> extends JsArray<M> implements JsArrayExt<M>
{
protected JsArrayExtImpl()
{
}
@Override
public final native void add(int addBefore, M model) /*-{
this.splice(addBefore, 0, model);
}-*/;
@Override
public final void add(M model)
{
...
}
}
错误:
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)`