【发布时间】:2016-06-22 09:54:43
【问题描述】:
我有一个包含一些用户基本信息的 java 类,现在我想从 JSNI 方法传递这个类对象
private native void publish(UserInfo userinfo) /*-{
this.@com.example.my.Class::helloMethod(userinfo;)();
}-*/
我怎样才能完成这项任务,请帮帮我.....
【问题讨论】:
-
这个方法无效,因为你没有指定类型。如果它是您可以使用此表示法的唯一方法:this.@com.example.my.Class::helloMethod(*)(userinfo);