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>
37 lines
1.7 KiB
Plaintext
37 lines
1.7 KiB
Plaintext
// Java class go.basictypes.Basictypes is a proxy for talking to a Go program.
|
|
// gobind -lang=java basictypes
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package go.basictypes;
|
|
|
|
import go.Seq;
|
|
|
|
public abstract class Basictypes {
|
|
static {
|
|
Seq.touch(); // for loading the native library
|
|
init();
|
|
}
|
|
|
|
private Basictypes() {} // uninstantiable
|
|
|
|
// touch is called from other bound packages to initialize this package
|
|
public static void touch() {}
|
|
|
|
private static native void init();
|
|
|
|
|
|
public static final boolean ABool = true;
|
|
public static final double AFloat = 0.2015;
|
|
public static final String ALongString = "LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString";
|
|
public static final int ARune = 32;
|
|
public static final String AString = "a string";
|
|
public static final long AnInt = 7L;
|
|
public static final long AnInt2 = 9223372036854775807L;
|
|
|
|
public static native boolean Bool(boolean p0);
|
|
public static native byte[] ByteArrays(byte[] x);
|
|
public static native void Error() throws Exception;
|
|
public static native long ErrorPair() throws Exception;
|
|
public static native void Ints(byte x, short y, int z, long t, long u);
|
|
}
|