Proxies are an implementation detail, so make them private to hide them from the public API. Also, move the proxy classes out of its interface scope; classes declared inside Java interfaces are always public and cannot be declared otherwise. Use the lowercase "proxy" class prefix to avoid name clashes with exported Go interfaces and structs. Change-Id: Iae6a53ed4885b7899f2fa770b73c135f54ffb263 Reviewed-on: https://go-review.googlesource.com/21370 Reviewed-by: David Crawshaw <crawshaw@golang.org>
109 lines
2.7 KiB
Plaintext
109 lines
2.7 KiB
Plaintext
// Java class go.interfaces.Interfaces is a proxy for talking to a Go program.
|
|
// gobind -lang=java interfaces
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package go.interfaces;
|
|
|
|
import go.Seq;
|
|
|
|
public abstract class Interfaces {
|
|
static {
|
|
Seq.touch(); // for loading the native library
|
|
init();
|
|
}
|
|
|
|
private Interfaces() {} // uninstantiable
|
|
|
|
// touch is called from other bound packages to initialize this package
|
|
public static void touch() {}
|
|
|
|
private static native void init();
|
|
|
|
public interface Error {
|
|
public void Err() throws Exception;
|
|
}
|
|
|
|
private static final class proxyError extends Seq.Proxy implements Error {
|
|
proxyError(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void Err() throws Exception;
|
|
}
|
|
|
|
public interface I {
|
|
public int Rand();
|
|
}
|
|
|
|
private static final class proxyI extends Seq.Proxy implements I {
|
|
proxyI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native int Rand();
|
|
}
|
|
|
|
public interface I1 {
|
|
public void J();
|
|
}
|
|
|
|
private static final class proxyI1 extends Seq.Proxy implements I1 {
|
|
proxyI1(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void J();
|
|
}
|
|
|
|
public interface I2 {
|
|
public void G();
|
|
}
|
|
|
|
private static final class proxyI2 extends Seq.Proxy implements I2 {
|
|
proxyI2(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void G();
|
|
}
|
|
|
|
public interface I3 {
|
|
public I1 F();
|
|
}
|
|
|
|
private static final class proxyI3 extends Seq.Proxy implements I3 {
|
|
proxyI3(Seq.Ref ref) { super(ref); }
|
|
|
|
public native I1 F();
|
|
}
|
|
|
|
public interface LargerI extends I, SameI {
|
|
public void AnotherFunc();
|
|
public int Rand();
|
|
}
|
|
|
|
private static final class proxyLargerI extends Seq.Proxy implements LargerI {
|
|
proxyLargerI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void AnotherFunc();
|
|
public native int Rand();
|
|
}
|
|
|
|
public interface SameI {
|
|
public int Rand();
|
|
}
|
|
|
|
private static final class proxySameI extends Seq.Proxy implements SameI {
|
|
proxySameI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native int Rand();
|
|
}
|
|
|
|
public interface WithParam {
|
|
public void HasParam(boolean p0);
|
|
}
|
|
|
|
private static final class proxyWithParam extends Seq.Proxy implements WithParam {
|
|
proxyWithParam(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void HasParam(boolean p0);
|
|
}
|
|
|
|
|
|
public static native int Add3(I r);
|
|
public static native void CallErr(Error e) throws Exception;
|
|
public static native I Seven();
|
|
}
|