mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind,cmd/gomobile: add a new generator for Java API wrappers
Using the new Java class analyzer API, scan the bound packages for references to Java classes and interfaces and generate Go wrappers for them. This is the second part of the implementation of proposal golang/go#16876. For golang/go#16876 Change-Id: I59ec0ebdae0081a615dc34d450f344c20c03f871 Reviewed-on: https://go-review.googlesource.com/28596 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Vendored
+96
@@ -0,0 +1,96 @@
|
||||
// Java class go.java.F is a proxy for talking to a Go program.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
package go.java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface F {
|
||||
|
||||
}
|
||||
|
||||
// Java class go.java.O is a proxy for talking to a Go program.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
package go.java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface O extends F, R {
|
||||
// skipped method O.Super with unsupported parameter or return types
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Java class go.java.R is a proxy for talking to a Go program.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
package go.java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface R {
|
||||
|
||||
}
|
||||
|
||||
// Java class go.java.S is a proxy for talking to a Go program.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
package go.java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface S extends F, R {
|
||||
// skipped method S.Super with unsupported parameter or return types
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Java class go.java.Java is a proxy for talking to a Go program.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
package go.java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public abstract class Java {
|
||||
static {
|
||||
Seq.touch(); // for loading the native library
|
||||
_init();
|
||||
}
|
||||
|
||||
private Java() {} // 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 proxyF extends Seq.Proxy implements F {
|
||||
proxyF(Seq.Ref ref) { super(ref); }
|
||||
|
||||
}
|
||||
private static final class proxyO extends Seq.Proxy implements O {
|
||||
proxyO(Seq.Ref ref) { super(ref); }
|
||||
|
||||
// skipped method O.Super with unsupported parameter or return types
|
||||
|
||||
}
|
||||
private static final class proxyR extends Seq.Proxy implements R {
|
||||
proxyR(Seq.Ref ref) { super(ref); }
|
||||
|
||||
}
|
||||
private static final class proxyS extends Seq.Proxy implements S {
|
||||
proxyS(Seq.Ref ref) { super(ref); }
|
||||
|
||||
// skipped method S.Super with unsupported parameter or return types
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user