github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/doc.java.golden (about) 1 // Java class doc.NoDoc is a proxy for talking to a Go program. 2 // gobind -lang=java doc 3 // 4 // File is generated by gobind. Do not edit. 5 package doc; 6 7 import go.Seq; 8 9 /** 10 * A generic comment with <HTML>. 11 */ 12 public final class NoDoc implements Seq.Proxy { 13 static { Doc.touch(); } 14 15 private final int refnum; 16 17 @Override public final int incRefnum() { 18 Seq.incGoRef(refnum, this); 19 return refnum; 20 } 21 22 NoDoc(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 23 24 public NoDoc() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } 25 26 private static native int __New(); 27 28 @Override public boolean equals(Object o) { 29 if (o == null || !(o instanceof NoDoc)) { 30 return false; 31 } 32 NoDoc that = (NoDoc)o; 33 return true; 34 } 35 36 @Override public int hashCode() { 37 return java.util.Arrays.hashCode(new Object[] {}); 38 } 39 40 @Override public String toString() { 41 StringBuilder b = new StringBuilder(); 42 b.append("NoDoc").append("{"); 43 return b.append("}").toString(); 44 } 45 } 46 47 // Java class doc.S is a proxy for talking to a Go program. 48 // gobind -lang=java doc 49 // 50 // File is generated by gobind. Do not edit. 51 package doc; 52 53 import go.Seq; 54 55 /** 56 * S is a struct. 57 */ 58 public final class S implements Seq.Proxy { 59 static { Doc.touch(); } 60 61 private final int refnum; 62 63 @Override public final int incRefnum() { 64 Seq.incGoRef(refnum, this); 65 return refnum; 66 } 67 68 /** 69 * NewS is a constructor. 70 */ 71 public S() { 72 this.refnum = __NewS(); 73 Seq.trackGoRef(refnum, this); 74 } 75 76 private static native int __NewS(); 77 78 S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 79 80 /** 81 * SF is a field. 82 */ 83 public final native String getSF(); 84 /** 85 * SF is a field. 86 */ 87 public final native void setSF(String v); 88 89 /** 90 * Anonymous field. 91 */ 92 public final native S2 getS2(); 93 /** 94 * Anonymous field. 95 */ 96 public final native void setS2(S2 v); 97 98 /** 99 * Multiple fields. 100 */ 101 public final native String getF1(); 102 /** 103 * Multiple fields. 104 */ 105 public final native void setF1(String v); 106 107 /** 108 * Multiple fields. 109 */ 110 public final native String getF2(); 111 /** 112 * Multiple fields. 113 */ 114 public final native void setF2(String v); 115 116 /** 117 * After is another method. 118 */ 119 public native void after(); 120 public native void before(); 121 @Override public boolean equals(Object o) { 122 if (o == null || !(o instanceof S)) { 123 return false; 124 } 125 S that = (S)o; 126 String thisSF = getSF(); 127 String thatSF = that.getSF(); 128 if (thisSF == null) { 129 if (thatSF != null) { 130 return false; 131 } 132 } else if (!thisSF.equals(thatSF)) { 133 return false; 134 } 135 S2 thisS2 = getS2(); 136 S2 thatS2 = that.getS2(); 137 if (thisS2 == null) { 138 if (thatS2 != null) { 139 return false; 140 } 141 } else if (!thisS2.equals(thatS2)) { 142 return false; 143 } 144 String thisF1 = getF1(); 145 String thatF1 = that.getF1(); 146 if (thisF1 == null) { 147 if (thatF1 != null) { 148 return false; 149 } 150 } else if (!thisF1.equals(thatF1)) { 151 return false; 152 } 153 String thisF2 = getF2(); 154 String thatF2 = that.getF2(); 155 if (thisF2 == null) { 156 if (thatF2 != null) { 157 return false; 158 } 159 } else if (!thisF2.equals(thatF2)) { 160 return false; 161 } 162 return true; 163 } 164 165 @Override public int hashCode() { 166 return java.util.Arrays.hashCode(new Object[] {getSF(), getS2(), getF1(), getF2()}); 167 } 168 169 @Override public String toString() { 170 StringBuilder b = new StringBuilder(); 171 b.append("S").append("{"); 172 b.append("SF:").append(getSF()).append(","); 173 b.append("S2:").append(getS2()).append(","); 174 b.append("F1:").append(getF1()).append(","); 175 b.append("F2:").append(getF2()).append(","); 176 return b.append("}").toString(); 177 } 178 } 179 180 // Java class doc.S2 is a proxy for talking to a Go program. 181 // gobind -lang=java doc 182 // 183 // File is generated by gobind. Do not edit. 184 package doc; 185 186 import go.Seq; 187 188 /** 189 * S2 is a struct. 190 */ 191 public final class S2 implements Seq.Proxy { 192 static { Doc.touch(); } 193 194 private final int refnum; 195 196 @Override public final int incRefnum() { 197 Seq.incGoRef(refnum, this); 198 return refnum; 199 } 200 201 S2(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 202 203 public S2() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } 204 205 private static native int __New(); 206 207 @Override public boolean equals(Object o) { 208 if (o == null || !(o instanceof S2)) { 209 return false; 210 } 211 S2 that = (S2)o; 212 return true; 213 } 214 215 @Override public int hashCode() { 216 return java.util.Arrays.hashCode(new Object[] {}); 217 } 218 219 @Override public String toString() { 220 StringBuilder b = new StringBuilder(); 221 b.append("S2").append("{"); 222 return b.append("}").toString(); 223 } 224 } 225 226 // Java class doc.I is a proxy for talking to a Go program. 227 // gobind -lang=java doc 228 // 229 // File is generated by gobind. Do not edit. 230 package doc; 231 232 import go.Seq; 233 234 /** 235 * I is an interface. 236 */ 237 public interface I { 238 /** 239 * IM is a method. 240 */ 241 public void im(); 242 243 } 244 245 // Java class doc.Doc is a proxy for talking to a Go program. 246 // gobind -lang=java doc 247 // 248 // File is generated by gobind. Do not edit. 249 package doc; 250 251 import go.Seq; 252 253 public abstract class Doc { 254 static { 255 Seq.touch(); // for loading the native library 256 _init(); 257 } 258 259 private Doc() {} // uninstantiable 260 261 // touch is called from other bound packages to initialize this package 262 public static void touch() {} 263 264 private static native void _init(); 265 266 private static final class proxyI implements Seq.Proxy, I { 267 private final int refnum; 268 269 @Override public final int incRefnum() { 270 Seq.incGoRef(refnum, this); 271 return refnum; 272 } 273 274 proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 275 276 public native void im(); 277 } 278 279 /** 280 * C is a constant. 281 */ 282 public static final boolean C = true; 283 284 /** 285 * A group of vars. 286 */ 287 public static native void setNoDocVar(double v); 288 /** 289 * A group of vars. 290 */ 291 public static native double getNoDocVar(); 292 293 /** 294 * A specific var. 295 */ 296 public static native void setSpecific(String v); 297 /** 298 * A specific var. 299 */ 300 public static native String getSpecific(); 301 302 /** 303 * V is a var. 304 */ 305 public static native void setV(String v); 306 /** 307 * V is a var. 308 */ 309 public static native String getV(); 310 311 public static native void f(); 312 public static native S newS(); 313 }