I am using GWT and have a Java method with a signature that requires a string and a boolean parameter, like this:
private void myMethod(String s, Boolean b) {}
I have a JSNI method that exposes this Java method after compilation:
public class myClass {
public native void exportMyMethod(myClass c)/*-{
$wnd.myMethod = $entry(function(s, b) {
[email protected]::myMethod(Ljava/lang/String;Z);
});
}-*/;
}
For the life of me, I cannot figure out how to properly format the param-signature when there's more than 1 parameter.
I've read the GWT documentation regarding how to do this. I've also read where that document directs me to how to properly refer to the JNI Type. But I cannot seem to find an example of how to format the signature when using more than 1 parameter. It seems like it should be easy.
So, how do I format my param-signature correctly? I've tried:
- [email protected]::myMethod(Ljava/lang/String;Z);
- [email protected]::myMethod(Ljava/lang/String;Ljava/lang/Boolean;);
- [email protected]::myMethod(Ljava/lang/StringLjava/lang/Boolean;);
- [email protected]::myMethod(Ljava/lang/String;,Ljava/lang/Boolean;);
Every different permutation that I've tried has resulted in the same error.
"Referencing method 'com.path.to.myClass.myMethod(Ljava/lang/String;Z)/' unable to resolve method."