github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/issue12328.java.golden (about) 1 // Java class issue12328.T is a proxy for talking to a Go program. 2 // gobind -lang=java issue12328 3 // 4 // File is generated by gobind. Do not edit. 5 package issue12328; 6 7 import go.Seq; 8 9 public final class T implements Seq.Proxy { 10 static { Issue12328.touch(); } 11 12 private final int refnum; 13 14 @Override public final int incRefnum() { 15 Seq.incGoRef(refnum, this); 16 return refnum; 17 } 18 19 T(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 20 21 public T() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } 22 23 private static native int __New(); 24 25 public final native java.lang.Exception getErr(); 26 public final native void setErr(java.lang.Exception v); 27 28 @Override public boolean equals(Object o) { 29 if (o == null || !(o instanceof T)) { 30 return false; 31 } 32 T that = (T)o; 33 java.lang.Exception thisErr = getErr(); 34 java.lang.Exception thatErr = that.getErr(); 35 if (thisErr == null) { 36 if (thatErr != null) { 37 return false; 38 } 39 } else if (!thisErr.equals(thatErr)) { 40 return false; 41 } 42 return true; 43 } 44 45 @Override public int hashCode() { 46 return java.util.Arrays.hashCode(new Object[] {getErr()}); 47 } 48 49 @Override public String toString() { 50 StringBuilder b = new StringBuilder(); 51 b.append("T").append("{"); 52 b.append("Err:").append(getErr()).append(","); 53 return b.append("}").toString(); 54 } 55 } 56 57 // Java class issue12328.Issue12328 is a proxy for talking to a Go program. 58 // gobind -lang=java issue12328 59 // 60 // File is generated by gobind. Do not edit. 61 package issue12328; 62 63 import go.Seq; 64 65 public abstract class Issue12328 { 66 static { 67 Seq.touch(); // for loading the native library 68 _init(); 69 } 70 71 private Issue12328() {} // uninstantiable 72 73 // touch is called from other bound packages to initialize this package 74 public static void touch() {} 75 76 private static native void _init(); 77 78 79 80 }