| 1 |
// Code generated by gobind. DO NOT EDIT. |
| 2 |
|
| 3 |
// Java class issue10788.TestStruct is a proxy for talking to a Go program. |
| 4 |
// |
| 5 |
// autogenerated by gobind -lang=java issue10788 |
| 6 |
package issue10788; |
| 7 |
|
| 8 |
import go.Seq; |
| 9 |
|
| 10 |
public final class TestStruct implements Seq.Proxy { |
| 11 |
static { Issue10788.touch(); } |
| 12 |
|
| 13 |
private final int refnum; |
| 14 |
|
| 15 |
@Override public final int incRefnum() { |
| 16 |
Seq.incGoRef(refnum, this); |
| 17 |
return refnum; |
| 18 |
} |
| 19 |
|
| 20 |
TestStruct(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } |
| 21 |
|
| 22 |
public TestStruct() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } |
| 23 |
|
| 24 |
private static native int __New(); |
| 25 |
|
| 26 |
public final native String getValue(); |
| 27 |
public final native void setValue(String v); |
| 28 |
|
| 29 |
@Override public boolean equals(Object o) { |
| 30 |
if (o == null || !(o instanceof TestStruct)) { |
| 31 |
return false; |
| 32 |
} |
| 33 |
TestStruct that = (TestStruct)o; |
| 34 |
String thisValue = getValue(); |
| 35 |
String thatValue = that.getValue(); |
| 36 |
if (thisValue == null) { |
| 37 |
if (thatValue != null) { |
| 38 |
return false; |
| 39 |
} |
| 40 |
} else if (!thisValue.equals(thatValue)) { |
| 41 |
return false; |
| 42 |
} |
| 43 |
return true; |
| 44 |
} |
| 45 |
|
| 46 |
@Override public int hashCode() { |
| 47 |
return java.util.Arrays.hashCode(new Object[] {getValue()}); |
| 48 |
} |
| 49 |
|
| 50 |
@Override public String toString() { |
| 51 |
StringBuilder b = new StringBuilder(); |
| 52 |
b.append("TestStruct").append("{"); |
| 53 |
b.append("Value:").append(getValue()).append(","); |
| 54 |
return b.append("}").toString(); |
| 55 |
} |
| 56 |
} |
| 57 |
|
| 58 |
// Code generated by gobind. DO NOT EDIT. |
| 59 |
|
| 60 |
// Java class issue10788.TestInterface is a proxy for talking to a Go program. |
| 61 |
// |
| 62 |
// autogenerated by gobind -lang=java issue10788 |
| 63 |
package issue10788; |
| 64 |
|
| 65 |
import go.Seq; |
| 66 |
|
| 67 |
public interface TestInterface { |
| 68 |
public void doSomeWork(TestStruct s); |
| 69 |
public void multipleUnnamedParams(long p0, String p1, long p2); |
| 70 |
|
| 71 |
} |
| 72 |
|
| 73 |
// Code generated by gobind. DO NOT EDIT. |
| 74 |
|
| 75 |
// Java class issue10788.Issue10788 is a proxy for talking to a Go program. |
| 76 |
// |
| 77 |
// autogenerated by gobind -lang=java issue10788 |
| 78 |
package issue10788; |
| 79 |
|
| 80 |
import go.Seq; |
| 81 |
|
| 82 |
public abstract class Issue10788 { |
| 83 |
static { |
| 84 |
Seq.touch(); // for loading the native library |
| 85 |
_init(); |
| 86 |
} |
| 87 |
|
| 88 |
private Issue10788() {} // uninstantiable |
| 89 |
|
| 90 |
// touch is called from other bound packages to initialize this package |
| 91 |
public static void touch() {} |
| 92 |
|
| 93 |
private static native void _init(); |
| 94 |
|
| 95 |
private static final class proxyTestInterface implements Seq.Proxy, TestInterface { |
| 96 |
private final int refnum; |
| 97 |
|
| 98 |
@Override public final int incRefnum() { |
| 99 |
Seq.incGoRef(refnum, this); |
| 100 |
return refnum; |
| 101 |
} |
| 102 |
|
| 103 |
proxyTestInterface(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } |
| 104 |
|
| 105 |
public native void doSomeWork(TestStruct s); |
| 106 |
public native void multipleUnnamedParams(long p0, String p1, long p2); |
| 107 |
} |
| 108 |
|
| 109 |
|
| 110 |
} |