Accept Java API interface types as arguments and return values from bound Go package functions and methods. Also, allow Go structs to extend Java classes and implement Java interfaces as well as override and implement methods. This is the third and final part of the implementation of the golang/go#16876 proposal. Fixes golang/go#16876 Change-Id: I6951dd87235553ce09abe5117a39a503466163c0 Reviewed-on: https://go-review.googlesource.com/28597 Reviewed-by: David Crawshaw <crawshaw@golang.org>
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
// Java class go.issue12403.Parsable is a proxy for talking to a Go program.
|
|
// gobind -lang=java issue12403
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package go.issue12403;
|
|
|
|
import go.Seq;
|
|
|
|
public interface Parsable {
|
|
public String fromJSON(String jstr);
|
|
public String toJSON() throws Exception;
|
|
|
|
}
|
|
|
|
// Java class go.issue12403.Issue12403 is a proxy for talking to a Go program.
|
|
// gobind -lang=java issue12403
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package go.issue12403;
|
|
|
|
import go.Seq;
|
|
|
|
public abstract class Issue12403 {
|
|
static {
|
|
Seq.touch(); // for loading the native library
|
|
_init();
|
|
}
|
|
|
|
private Issue12403() {} // uninstantiable
|
|
|
|
// touch is called from other bound packages to initialize this package
|
|
public static void touch() {}
|
|
|
|
private static native void _init();
|
|
|
|
private static final class proxyParsable extends Seq.Proxy implements Parsable {
|
|
proxyParsable(Seq.Ref ref) { super(ref); }
|
|
|
|
public native String fromJSON(String jstr);
|
|
public native String toJSON() throws Exception;
|
|
}
|
|
|
|
|
|
}
|