2
0
mirror of synced 2025-02-24 07:18:15 +00:00
mobile/bind/testdata/ignore.java.golden
Elias Naur 80e11ad074 mobile/bind: move generated Java classes to package level
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>
2016-08-22 07:41:35 +00:00

97 lines
2.6 KiB
Plaintext

// Java class go.ignore.S is a proxy for talking to a Go program.
// gobind -lang=java ignore
//
// File is generated by gobind. Do not edit.
package go.ignore;
import go.Seq;
public final class S extends Seq.Proxy implements I {
private S(go.Seq.Ref ref) { super(ref); }
// skipped field S.F with unsupported type: *types.Interface
// skipped method S.Argument with unsupported parameter or return types
// skipped method S.Result with unsupported parameter or return types
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof S)) {
return false;
}
S that = (S)o;
// skipped field S.F with unsupported type: *types.Interface
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("S").append("{");
return b.append("}").toString();
}
}
// Java class go.ignore.I is a proxy for talking to a Go program.
// gobind -lang=java ignore
//
// File is generated by gobind. Do not edit.
package go.ignore;
import go.Seq;
public interface I {
// skipped method I.Argument with unsupported parameter or return types
// skipped method I.Result with unsupported parameter or return types
}
// Java class go.ignore.Ignore is a proxy for talking to a Go program.
// gobind -lang=java ignore
//
// File is generated by gobind. Do not edit.
package go.ignore;
import go.Seq;
public abstract class Ignore {
static {
Seq.touch(); // for loading the native library
init();
}
private Ignore() {} // 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 proxyI extends Seq.Proxy implements I {
proxyI(Seq.Ref ref) { super(ref); }
// skipped method I.Argument with unsupported parameter or return types
// skipped method I.Result with unsupported parameter or return types
}
// skipped const NamedConst with unsupported type: *types.Const
// skipped variable V with unsupported type: *types.Interface
// skipped variable Var with unsupported type: *types.Interface
// skipped function Argument with unsupported parameter or return types
// skipped function Result with unsupported parameter or return types
}