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