Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/go/src/golang.org/x/mobile/bind/testdata/interfaces.java.golden

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Java Package interfaces 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 go.interfaces;
6
7 import go.Seq;
8
9 public abstract class Interfaces {
10 private Interfaces() {} // uninstantiable
11
12 public static int Add3(I r) {
13 go.Seq _in = new go.Seq();
14 go.Seq _out = new go.Seq();
15 int _result;
16 _in.writeRef(r.ref());
17 Seq.send(DESCRIPTOR, CALL_Add3, _in, _out);
18 _result = _out.readInt32();
19 return _result;
20 }
21
22 public interface I extends go.Seq.Object {
23 public int Rand();
24
25 public static abstract class Stub implements I {
26 static final String DESCRIPTOR = "go.interfaces.I";
27
28 private final go.Seq.Ref ref;
29 public Stub() {
30 ref = go.Seq.createRef(this);
31 }
32
33 public go.Seq.Ref ref() { return ref; }
34
35 public void call(int code, go.Seq in, go.Seq out) {
36 switch (code) {
37 case Proxy.CALL_Rand: {
38 int result = this.Rand();
39 out.writeInt32(result);
40 return;
41 }
42 default:
43 throw new RuntimeException("unknown code: "+ code);
44 }
45 }
46 }
47
48 static final class Proxy implements I {
49 static final String DESCRIPTOR = Stub.DESCRIPTOR;
50
51 private go.Seq.Ref ref;
52
53 Proxy(go.Seq.Ref ref) { this.ref = ref; }
54
55 public go.Seq.Ref ref() { return ref; }
56
57 public void call(int code, go.Seq in, go.Seq out) {
58 throw new RuntimeException("cycle: cannot call proxy");
59 }
60
61 public int Rand() {
62 go.Seq _in = new go.Seq();
63 go.Seq _out = new go.Seq();
64 int _result;
65 _in.writeRef(ref);
66 Seq.send(DESCRIPTOR, CALL_Rand, _in, _out);
67 _result = _out.readInt32();
68 return _result;
69 }
70
71 static final int CALL_Rand = 0x10a;
72 }
73 }
74
75 public static I Seven() {
76 go.Seq _in = new go.Seq();
77 go.Seq _out = new go.Seq();
78 I _result;
79 Seq.send(DESCRIPTOR, CALL_Seven, _in, _out);
80 _result = new I.Proxy(_out.readRef());
81 return _result;
82 }
83
84 private static final int CALL_Add3 = 1;
85 private static final int CALL_Seven = 2;
86 private static final String DESCRIPTOR = "interfaces";
87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698