Debian Codegraph @

bind/testdata/vars.java.golden

raw
1 // Code generated by gobind. DO NOT EDIT.
2
3 // Java class vars.S is a proxy for talking to a Go program.
4 //
5 // autogenerated by gobind -lang=java vars
6 package vars;
7
8 import go.Seq;
9
10 public final class S implements Seq.Proxy, I {
11 static { Vars.touch(); }
12
13 private final int refnum;
14
15 @Override public final int incRefnum() {
16 Seq.incGoRef(refnum, this);
17 return refnum;
18 }
19
20 S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
21
22 public S() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
23
24 private static native int __New();
25
26 @Override public boolean equals(Object o) {
27 if (o == null || !(o instanceof S)) {
28 return false;
29 }
30 S that = (S)o;
31 return true;
32 }
33
34 @Override public int hashCode() {
35 return java.util.Arrays.hashCode(new Object[] {});
36 }
37
38 @Override public String toString() {
39 StringBuilder b = new StringBuilder();
40 b.append("S").append("{");
41 return b.append("}").toString();
42 }
43 }
44
45 // Code generated by gobind. DO NOT EDIT.
46
47 // Java class vars.I is a proxy for talking to a Go program.
48 //
49 // autogenerated by gobind -lang=java vars
50 package vars;
51
52 import go.Seq;
53
54 public interface I {
55
56 }
57
58 // Code generated by gobind. DO NOT EDIT.
59
60 // Java class vars.Vars is a proxy for talking to a Go program.
61 //
62 // autogenerated by gobind -lang=java vars
63 package vars;
64
65 import go.Seq;
66
67 public abstract class Vars {
68 static {
69 Seq.touch(); // for loading the native library
70 _init();
71 }
72
73 private Vars() {} // uninstantiable
74
75 // touch is called from other bound packages to initialize this package
76 public static void touch() {}
77
78 private static native void _init();
79
80 private static final class proxyI implements Seq.Proxy, I {
81 private final int refnum;
82
83 @Override public final int incRefnum() {
84 Seq.incGoRef(refnum, this);
85 return refnum;
86 }
87
88 proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
89
90 }
91
92
93 public static native void setABool(boolean v);
94 public static native boolean getABool();
95
96 public static native void setAFloat(double v);
97 public static native double getAFloat();
98
99 public static native void setAFloat32(float v);
100 public static native float getAFloat32();
101
102 public static native void setAFloat64(double v);
103 public static native double getAFloat64();
104
105 public static native void setAString(String v);
106 public static native String getAString();
107
108 public static native void setAStructPtr(S v);
109 public static native S getAStructPtr();
110
111 public static native void setAnInt(long v);
112 public static native long getAnInt();
113
114 public static native void setAnInt16(short v);
115 public static native short getAnInt16();
116
117 public static native void setAnInt32(int v);
118 public static native int getAnInt32();
119
120 public static native void setAnInt64(long v);
121 public static native long getAnInt64();
122
123 public static native void setAnInt8(byte v);
124 public static native byte getAnInt8();
125
126 public static native void setAnInterface(I v);
127 public static native I getAnInterface();
128
129 }