github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/interfaces.java.golden (about) 1 // Java class interfaces.Error is a proxy for talking to a Go program. 2 // gobind -lang=java interfaces 3 // 4 // File is generated by gobind. Do not edit. 5 package interfaces; 6 7 import go.Seq; 8 9 public interface Error { 10 public void err() throws Exception; 11 12 } 13 14 // Java class interfaces.I is a proxy for talking to a Go program. 15 // gobind -lang=java interfaces 16 // 17 // File is generated by gobind. Do not edit. 18 package interfaces; 19 20 import go.Seq; 21 22 public interface I { 23 public int rand(); 24 25 } 26 27 // Java class interfaces.I1 is a proxy for talking to a Go program. 28 // gobind -lang=java interfaces 29 // 30 // File is generated by gobind. Do not edit. 31 package interfaces; 32 33 import go.Seq; 34 35 /** 36 * not implementable 37 */ 38 public interface I1 { 39 public void j(); 40 41 } 42 43 // Java class interfaces.I2 is a proxy for talking to a Go program. 44 // gobind -lang=java interfaces 45 // 46 // File is generated by gobind. Do not edit. 47 package interfaces; 48 49 import go.Seq; 50 51 /** 52 * not implementable 53 */ 54 public interface I2 { 55 public void g(); 56 57 } 58 59 // Java class interfaces.I3 is a proxy for talking to a Go program. 60 // gobind -lang=java interfaces 61 // 62 // File is generated by gobind. Do not edit. 63 package interfaces; 64 65 import go.Seq; 66 67 /** 68 * implementable 69 (the implementor has to find a source of I1s) 70 */ 71 public interface I3 { 72 public I1 f(); 73 74 } 75 76 // Java class interfaces.Interfaces_ is a proxy for talking to a Go program. 77 // gobind -lang=java interfaces 78 // 79 // File is generated by gobind. Do not edit. 80 package interfaces; 81 82 import go.Seq; 83 84 /** 85 * Interfaces is an interface with the same name as its package. 86 */ 87 public interface Interfaces_ { 88 public void someMethod(); 89 90 } 91 92 // Java class interfaces.LargerI is a proxy for talking to a Go program. 93 // gobind -lang=java interfaces 94 // 95 // File is generated by gobind. Do not edit. 96 package interfaces; 97 98 import go.Seq; 99 100 public interface LargerI extends I, SameI { 101 public void anotherFunc(); 102 public int rand(); 103 104 } 105 106 // Java class interfaces.SameI is a proxy for talking to a Go program. 107 // gobind -lang=java interfaces 108 // 109 // File is generated by gobind. Do not edit. 110 package interfaces; 111 112 import go.Seq; 113 114 public interface SameI { 115 public int rand(); 116 117 } 118 119 // Java class interfaces.WithParam is a proxy for talking to a Go program. 120 // gobind -lang=java interfaces 121 // 122 // File is generated by gobind. Do not edit. 123 package interfaces; 124 125 import go.Seq; 126 127 public interface WithParam { 128 public void hasParam(boolean p0); 129 130 } 131 132 // Java class interfaces.Interfaces is a proxy for talking to a Go program. 133 // gobind -lang=java interfaces 134 // 135 // File is generated by gobind. Do not edit. 136 package interfaces; 137 138 import go.Seq; 139 140 public abstract class Interfaces { 141 static { 142 Seq.touch(); // for loading the native library 143 _init(); 144 } 145 146 private Interfaces() {} // uninstantiable 147 148 // touch is called from other bound packages to initialize this package 149 public static void touch() {} 150 151 private static native void _init(); 152 153 private static final class proxyError implements Seq.Proxy, Error { 154 private final int refnum; 155 156 @Override public final int incRefnum() { 157 Seq.incGoRef(refnum, this); 158 return refnum; 159 } 160 161 proxyError(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 162 163 public native void err() throws Exception; 164 } 165 private static final class proxyI implements Seq.Proxy, I { 166 private final int refnum; 167 168 @Override public final int incRefnum() { 169 Seq.incGoRef(refnum, this); 170 return refnum; 171 } 172 173 proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 174 175 public native int rand(); 176 } 177 private static final class proxyI1 implements Seq.Proxy, I1 { 178 private final int refnum; 179 180 @Override public final int incRefnum() { 181 Seq.incGoRef(refnum, this); 182 return refnum; 183 } 184 185 proxyI1(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 186 187 public native void j(); 188 } 189 private static final class proxyI2 implements Seq.Proxy, I2 { 190 private final int refnum; 191 192 @Override public final int incRefnum() { 193 Seq.incGoRef(refnum, this); 194 return refnum; 195 } 196 197 proxyI2(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 198 199 public native void g(); 200 } 201 private static final class proxyI3 implements Seq.Proxy, I3 { 202 private final int refnum; 203 204 @Override public final int incRefnum() { 205 Seq.incGoRef(refnum, this); 206 return refnum; 207 } 208 209 proxyI3(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 210 211 public native I1 f(); 212 } 213 private static final class proxyInterfaces implements Seq.Proxy, Interfaces_ { 214 private final int refnum; 215 216 @Override public final int incRefnum() { 217 Seq.incGoRef(refnum, this); 218 return refnum; 219 } 220 221 proxyInterfaces(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 222 223 public native void someMethod(); 224 } 225 private static final class proxyLargerI implements Seq.Proxy, LargerI { 226 private final int refnum; 227 228 @Override public final int incRefnum() { 229 Seq.incGoRef(refnum, this); 230 return refnum; 231 } 232 233 proxyLargerI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 234 235 public native void anotherFunc(); 236 public native int rand(); 237 } 238 private static final class proxySameI implements Seq.Proxy, SameI { 239 private final int refnum; 240 241 @Override public final int incRefnum() { 242 Seq.incGoRef(refnum, this); 243 return refnum; 244 } 245 246 proxySameI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 247 248 public native int rand(); 249 } 250 private static final class proxyWithParam implements Seq.Proxy, WithParam { 251 private final int refnum; 252 253 @Override public final int incRefnum() { 254 Seq.incGoRef(refnum, this); 255 return refnum; 256 } 257 258 proxyWithParam(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } 259 260 public native void hasParam(boolean p0); 261 } 262 263 264 public static native int add3(I r); 265 public static native void callErr(Error e) throws Exception; 266 public static native I seven(); 267 }