Before this CL, generated Java classes or interfaces were inner classes to the top package class. That is both unnecessary and creates ugly class names. Instead, move every generated class and interface to its own package level class. NOTE: This is a backwards incompatible change and requires every client of gomobile APIs to be updated to leave out the package class in the type names. For example, the Go type package pkg type S struct { } now generates (with the default java package name go) a Java class named go.pkg.S. The name before this CL was go.pkg.Pkg.S. Also, change the custom java package to specify the package prefix and not the full package as before. This is an unfortunate change needed to avoid name clashes between two bound packages. On the plus side, the change brings the custom package case closer to the default behaviour, which is a commen prefix, "go.", and a distinct java package for every Go package bound. Change-Id: Iadfaad56e101d1caf7e2a05006f4d384859a20fe Reviewed-on: https://go-review.googlesource.com/27436 Reviewed-by: David Crawshaw <crawshaw@golang.org>
174 lines
4.1 KiB
Plaintext
174 lines
4.1 KiB
Plaintext
// Java class go.interfaces.Error 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 interface Error {
|
|
public void Err() throws Exception;
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.I 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 interface I {
|
|
public int Rand();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.I1 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 interface I1 {
|
|
public void J();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.I2 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 interface I2 {
|
|
public void G();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.I3 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 interface I3 {
|
|
public I1 F();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.LargerI 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 interface LargerI extends I, SameI {
|
|
public void AnotherFunc();
|
|
public int Rand();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.SameI 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 interface SameI {
|
|
public int Rand();
|
|
|
|
}
|
|
|
|
// Java class go.interfaces.WithParam 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 interface WithParam {
|
|
public void HasParam(boolean p0);
|
|
|
|
}
|
|
|
|
// 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();
|
|
|
|
private static final class proxyError extends Seq.Proxy implements Error {
|
|
proxyError(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void Err() throws Exception;
|
|
}
|
|
private static final class proxyI extends Seq.Proxy implements I {
|
|
proxyI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native int Rand();
|
|
}
|
|
private static final class proxyI1 extends Seq.Proxy implements I1 {
|
|
proxyI1(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void J();
|
|
}
|
|
private static final class proxyI2 extends Seq.Proxy implements I2 {
|
|
proxyI2(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void G();
|
|
}
|
|
private static final class proxyI3 extends Seq.Proxy implements I3 {
|
|
proxyI3(Seq.Ref ref) { super(ref); }
|
|
|
|
public native I1 F();
|
|
}
|
|
private static final class proxyLargerI extends Seq.Proxy implements LargerI {
|
|
proxyLargerI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native void AnotherFunc();
|
|
public native int Rand();
|
|
}
|
|
private static final class proxySameI extends Seq.Proxy implements SameI {
|
|
proxySameI(Seq.Ref ref) { super(ref); }
|
|
|
|
public native int Rand();
|
|
}
|
|
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();
|
|
}
|