2
0
mirror of synced 2025-02-23 23:08:14 +00:00
mobile/bind/testdata/ignore.java.golden
Péter Szilágyi 1663ffa95c bind: initialize JNI library on any class load
With the introduction of constructors Java side, all types
become entry points into the library. However the library
was only initialized by the main class until now, resulting
in all other constructors hitting linker errors until an
interaction with the main library class.

This CL fixes that by changing each generated type to touch
the main library class, ensuring that the underlying native
library is loaded.

Change-Id: I640d1dc329e072f8d0753f74ccce87cd9e5aaea8
Reviewed-on: https://go-review.googlesource.com/29994
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2016-09-29 11:31:45 +00:00

99 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 {
static { Ignore.touch(); }
S(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
}