我有一个java类,其中包含一些用户基本信息,现在我想从JSNI方法传递这个类对象
private native void publish(UserInfo userinfo) /*-{
this.@com.example.my.Class::helloMethod(userinfo;)();
}-*/
我怎么能完成这项任务请帮助我们......
答案 0 :(得分:2)
private native void publish(UserInfo userinfo) /*-{
this.@com.example.client.TestJNSI::helloMethod(Lcom/example/shared/UserInfo;)(userinfo);
}-*/;
我希望这就是你要找的东西。确保使用完全限定类名称替换示例类名。有关其他信息,请参阅JSNI basic。