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

Side by Side Diff: third_party/go/src/golang.org/x/mobile/bind/testdata/structs.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 structs is a proxy for talking to a Go program.
2 // gobind -lang=java structs
3 //
4 // File is generated by gobind. Do not edit.
5 package go.structs;
6
7 import go.Seq;
8
9 public abstract class Structs {
10 private Structs() {} // uninstantiable
11
12 public static final class S implements go.Seq.Object {
13 private static final String DESCRIPTOR = "go.structs.S";
14 private static final int FIELD_X_GET = 0x00f;
15 private static final int FIELD_X_SET = 0x01f;
16 private static final int FIELD_Y_GET = 0x10f;
17 private static final int FIELD_Y_SET = 0x11f;
18 private static final int CALL_Sum = 0x00c;
19
20 private go.Seq.Ref ref;
21
22 private S(go.Seq.Ref ref) { this.ref = ref; }
23
24 public go.Seq.Ref ref() { return ref; }
25
26 public void call(int code, go.Seq in, go.Seq out) {
27 throw new RuntimeException("internal error: cycle: cannot call concr ete proxy");
28 }
29
30 public double getX() {
31 Seq in = new Seq();
32 Seq out = new Seq();
33 in.writeRef(ref);
34 Seq.send(DESCRIPTOR, FIELD_X_GET, in, out);
35 return out.readFloat64();
36 }
37
38 public void setX(double v) {
39 Seq in = new Seq();
40 Seq out = new Seq();
41 in.writeRef(ref);
42 in.writeFloat64(v);
43 Seq.send(DESCRIPTOR, FIELD_X_SET, in, out);
44 }
45 public double getY() {
46 Seq in = new Seq();
47 Seq out = new Seq();
48 in.writeRef(ref);
49 Seq.send(DESCRIPTOR, FIELD_Y_GET, in, out);
50 return out.readFloat64();
51 }
52
53 public void setY(double v) {
54 Seq in = new Seq();
55 Seq out = new Seq();
56 in.writeRef(ref);
57 in.writeFloat64(v);
58 Seq.send(DESCRIPTOR, FIELD_Y_SET, in, out);
59 }
60
61 public double Sum() {
62 go.Seq _in = new go.Seq();
63 go.Seq _out = new go.Seq();
64 double _result;
65 _in.writeRef(ref);
66 Seq.send(DESCRIPTOR, CALL_Sum, _in, _out);
67 _result = _out.readFloat64();
68 return _result;
69 }
70
71 @Override public boolean equals(Object o) {
72 if (o == null || !(o instanceof S)) {
73 return false;
74 }
75 S that = (S)o;
76 double thisX = getX();
77 double thatX = that.getX();
78 if (thisX != thatX) {
79 return false;
80 }
81 double thisY = getY();
82 double thatY = that.getY();
83 if (thisY != thatY) {
84 return false;
85 }
86 return true;
87 }
88
89 @Override public int hashCode() {
90 return java.util.Arrays.hashCode(new Object[] {getX(), getY()});
91 }
92
93 @Override public String toString() {
94 StringBuilder b = new StringBuilder();
95 b.append("S").append("{");
96 b.append("X:").append(getX()).append(",");
97 b.append("Y:").append(getY()).append(",");
98 return b.append("}").toString();
99 }
100
101 }
102
103 private static final String DESCRIPTOR = "structs";
104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698