...
1// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import com.google.flatbuffers.BaseVector;
6import com.google.flatbuffers.BooleanVector;
7import com.google.flatbuffers.ByteVector;
8import com.google.flatbuffers.Constants;
9import com.google.flatbuffers.DoubleVector;
10import com.google.flatbuffers.FlatBufferBuilder;
11import com.google.flatbuffers.FloatVector;
12import com.google.flatbuffers.IntVector;
13import com.google.flatbuffers.LongVector;
14import com.google.flatbuffers.ShortVector;
15import com.google.flatbuffers.StringVector;
16import com.google.flatbuffers.Struct;
17import com.google.flatbuffers.Table;
18import com.google.flatbuffers.UnionVector;
19import java.nio.ByteBuffer;
20import java.nio.ByteOrder;
21
22public class MonsterT {
23 private MyGame.Example.Vec3T pos;
24 private short mana;
25 private short hp;
26 private String name;
27 private int[] inventory;
28 private int color;
29 private MyGame.Example.AnyUnion test;
30 private MyGame.Example.TestT[] test4;
31 private String[] testarrayofstring;
32 private MyGame.Example.MonsterT[] testarrayoftables;
33 private MyGame.Example.MonsterT enemy;
34 private int[] testnestedflatbuffer;
35 private MyGame.Example.StatT testempty;
36 private boolean testbool;
37 private int testhashs32Fnv1;
38 private long testhashu32Fnv1;
39 private long testhashs64Fnv1;
40 private long testhashu64Fnv1;
41 private int testhashs32Fnv1a;
42 private long testhashu32Fnv1a;
43 private long testhashs64Fnv1a;
44 private long testhashu64Fnv1a;
45 private boolean[] testarrayofbools;
46 private float testf;
47 private float testf2;
48 private float testf3;
49 private String[] testarrayofstring2;
50 private MyGame.Example.AbilityT[] testarrayofsortedstruct;
51 private int[] flex;
52 private MyGame.Example.TestT[] test5;
53 private long[] vectorOfLongs;
54 private double[] vectorOfDoubles;
55 private MyGame.InParentNamespaceT parentNamespaceTest;
56 private MyGame.Example.ReferrableT[] vectorOfReferrables;
57 private long singleWeakReference;
58 private long[] vectorOfWeakReferences;
59 private MyGame.Example.ReferrableT[] vectorOfStrongReferrables;
60 private long coOwningReference;
61 private long[] vectorOfCoOwningReferences;
62 private long nonOwningReference;
63 private long[] vectorOfNonOwningReferences;
64 private MyGame.Example.AnyUniqueAliasesUnion anyUnique;
65 private MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous;
66 private int[] vectorOfEnums;
67 private byte signedEnum;
68 private int[] testrequirednestedflatbuffer;
69 private MyGame.Example.StatT[] scalarKeySortedTables;
70 private MyGame.Example.TestT nativeInline;
71 private long longEnumNonEnumDefault;
72 private long longEnumNormalDefault;
73 private float nanDefault;
74 private float infDefault;
75 private float positiveInfDefault;
76 private float infinityDefault;
77 private float positiveInfinityDefault;
78 private float negativeInfDefault;
79 private float negativeInfinityDefault;
80 private double doubleInfDefault;
81
82 public MyGame.Example.Vec3T getPos() { return pos; }
83
84 public void setPos(MyGame.Example.Vec3T pos) { this.pos = pos; }
85
86 public short getMana() { return mana; }
87
88 public void setMana(short mana) { this.mana = mana; }
89
90 public short getHp() { return hp; }
91
92 public void setHp(short hp) { this.hp = hp; }
93
94 public String getName() { return name; }
95
96 public void setName(String name) { this.name = name; }
97
98 public int[] getInventory() { return inventory; }
99
100 public void setInventory(int[] inventory) { this.inventory = inventory; }
101
102 public int getColor() { return color; }
103
104 public void setColor(int color) { this.color = color; }
105
106 public MyGame.Example.AnyUnion getTest() { return test; }
107
108 public void setTest(MyGame.Example.AnyUnion test) { this.test = test; }
109
110 public MyGame.Example.TestT[] getTest4() { return test4; }
111
112 public void setTest4(MyGame.Example.TestT[] test4) { this.test4 = test4; }
113
114 public String[] getTestarrayofstring() { return testarrayofstring; }
115
116 public void setTestarrayofstring(String[] testarrayofstring) { this.testarrayofstring = testarrayofstring; }
117
118 public MyGame.Example.MonsterT[] getTestarrayoftables() { return testarrayoftables; }
119
120 public void setTestarrayoftables(MyGame.Example.MonsterT[] testarrayoftables) { this.testarrayoftables = testarrayoftables; }
121
122 public MyGame.Example.MonsterT getEnemy() { return enemy; }
123
124 public void setEnemy(MyGame.Example.MonsterT enemy) { this.enemy = enemy; }
125
126 public int[] getTestnestedflatbuffer() { return testnestedflatbuffer; }
127
128 public void setTestnestedflatbuffer(int[] testnestedflatbuffer) { this.testnestedflatbuffer = testnestedflatbuffer; }
129
130 public MyGame.Example.StatT getTestempty() { return testempty; }
131
132 public void setTestempty(MyGame.Example.StatT testempty) { this.testempty = testempty; }
133
134 public boolean getTestbool() { return testbool; }
135
136 public void setTestbool(boolean testbool) { this.testbool = testbool; }
137
138 public int getTesthashs32Fnv1() { return testhashs32Fnv1; }
139
140 public void setTesthashs32Fnv1(int testhashs32Fnv1) { this.testhashs32Fnv1 = testhashs32Fnv1; }
141
142 public long getTesthashu32Fnv1() { return testhashu32Fnv1; }
143
144 public void setTesthashu32Fnv1(long testhashu32Fnv1) { this.testhashu32Fnv1 = testhashu32Fnv1; }
145
146 public long getTesthashs64Fnv1() { return testhashs64Fnv1; }
147
148 public void setTesthashs64Fnv1(long testhashs64Fnv1) { this.testhashs64Fnv1 = testhashs64Fnv1; }
149
150 public long getTesthashu64Fnv1() { return testhashu64Fnv1; }
151
152 public void setTesthashu64Fnv1(long testhashu64Fnv1) { this.testhashu64Fnv1 = testhashu64Fnv1; }
153
154 public int getTesthashs32Fnv1a() { return testhashs32Fnv1a; }
155
156 public void setTesthashs32Fnv1a(int testhashs32Fnv1a) { this.testhashs32Fnv1a = testhashs32Fnv1a; }
157
158 public long getTesthashu32Fnv1a() { return testhashu32Fnv1a; }
159
160 public void setTesthashu32Fnv1a(long testhashu32Fnv1a) { this.testhashu32Fnv1a = testhashu32Fnv1a; }
161
162 public long getTesthashs64Fnv1a() { return testhashs64Fnv1a; }
163
164 public void setTesthashs64Fnv1a(long testhashs64Fnv1a) { this.testhashs64Fnv1a = testhashs64Fnv1a; }
165
166 public long getTesthashu64Fnv1a() { return testhashu64Fnv1a; }
167
168 public void setTesthashu64Fnv1a(long testhashu64Fnv1a) { this.testhashu64Fnv1a = testhashu64Fnv1a; }
169
170 public boolean[] getTestarrayofbools() { return testarrayofbools; }
171
172 public void setTestarrayofbools(boolean[] testarrayofbools) { this.testarrayofbools = testarrayofbools; }
173
174 public float getTestf() { return testf; }
175
176 public void setTestf(float testf) { this.testf = testf; }
177
178 public float getTestf2() { return testf2; }
179
180 public void setTestf2(float testf2) { this.testf2 = testf2; }
181
182 public float getTestf3() { return testf3; }
183
184 public void setTestf3(float testf3) { this.testf3 = testf3; }
185
186 public String[] getTestarrayofstring2() { return testarrayofstring2; }
187
188 public void setTestarrayofstring2(String[] testarrayofstring2) { this.testarrayofstring2 = testarrayofstring2; }
189
190 public MyGame.Example.AbilityT[] getTestarrayofsortedstruct() { return testarrayofsortedstruct; }
191
192 public void setTestarrayofsortedstruct(MyGame.Example.AbilityT[] testarrayofsortedstruct) { this.testarrayofsortedstruct = testarrayofsortedstruct; }
193
194 public int[] getFlex() { return flex; }
195
196 public void setFlex(int[] flex) { this.flex = flex; }
197
198 public MyGame.Example.TestT[] getTest5() { return test5; }
199
200 public void setTest5(MyGame.Example.TestT[] test5) { this.test5 = test5; }
201
202 public long[] getVectorOfLongs() { return vectorOfLongs; }
203
204 public void setVectorOfLongs(long[] vectorOfLongs) { this.vectorOfLongs = vectorOfLongs; }
205
206 public double[] getVectorOfDoubles() { return vectorOfDoubles; }
207
208 public void setVectorOfDoubles(double[] vectorOfDoubles) { this.vectorOfDoubles = vectorOfDoubles; }
209
210 public MyGame.InParentNamespaceT getParentNamespaceTest() { return parentNamespaceTest; }
211
212 public void setParentNamespaceTest(MyGame.InParentNamespaceT parentNamespaceTest) { this.parentNamespaceTest = parentNamespaceTest; }
213
214 public MyGame.Example.ReferrableT[] getVectorOfReferrables() { return vectorOfReferrables; }
215
216 public void setVectorOfReferrables(MyGame.Example.ReferrableT[] vectorOfReferrables) { this.vectorOfReferrables = vectorOfReferrables; }
217
218 public long getSingleWeakReference() { return singleWeakReference; }
219
220 public void setSingleWeakReference(long singleWeakReference) { this.singleWeakReference = singleWeakReference; }
221
222 public long[] getVectorOfWeakReferences() { return vectorOfWeakReferences; }
223
224 public void setVectorOfWeakReferences(long[] vectorOfWeakReferences) { this.vectorOfWeakReferences = vectorOfWeakReferences; }
225
226 public MyGame.Example.ReferrableT[] getVectorOfStrongReferrables() { return vectorOfStrongReferrables; }
227
228 public void setVectorOfStrongReferrables(MyGame.Example.ReferrableT[] vectorOfStrongReferrables) { this.vectorOfStrongReferrables = vectorOfStrongReferrables; }
229
230 public long getCoOwningReference() { return coOwningReference; }
231
232 public void setCoOwningReference(long coOwningReference) { this.coOwningReference = coOwningReference; }
233
234 public long[] getVectorOfCoOwningReferences() { return vectorOfCoOwningReferences; }
235
236 public void setVectorOfCoOwningReferences(long[] vectorOfCoOwningReferences) { this.vectorOfCoOwningReferences = vectorOfCoOwningReferences; }
237
238 public long getNonOwningReference() { return nonOwningReference; }
239
240 public void setNonOwningReference(long nonOwningReference) { this.nonOwningReference = nonOwningReference; }
241
242 public long[] getVectorOfNonOwningReferences() { return vectorOfNonOwningReferences; }
243
244 public void setVectorOfNonOwningReferences(long[] vectorOfNonOwningReferences) { this.vectorOfNonOwningReferences = vectorOfNonOwningReferences; }
245
246 public MyGame.Example.AnyUniqueAliasesUnion getAnyUnique() { return anyUnique; }
247
248 public void setAnyUnique(MyGame.Example.AnyUniqueAliasesUnion anyUnique) { this.anyUnique = anyUnique; }
249
250 public MyGame.Example.AnyAmbiguousAliasesUnion getAnyAmbiguous() { return anyAmbiguous; }
251
252 public void setAnyAmbiguous(MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous) { this.anyAmbiguous = anyAmbiguous; }
253
254 public int[] getVectorOfEnums() { return vectorOfEnums; }
255
256 public void setVectorOfEnums(int[] vectorOfEnums) { this.vectorOfEnums = vectorOfEnums; }
257
258 public byte getSignedEnum() { return signedEnum; }
259
260 public void setSignedEnum(byte signedEnum) { this.signedEnum = signedEnum; }
261
262 public int[] getTestrequirednestedflatbuffer() { return testrequirednestedflatbuffer; }
263
264 public void setTestrequirednestedflatbuffer(int[] testrequirednestedflatbuffer) { this.testrequirednestedflatbuffer = testrequirednestedflatbuffer; }
265
266 public MyGame.Example.StatT[] getScalarKeySortedTables() { return scalarKeySortedTables; }
267
268 public void setScalarKeySortedTables(MyGame.Example.StatT[] scalarKeySortedTables) { this.scalarKeySortedTables = scalarKeySortedTables; }
269
270 public MyGame.Example.TestT getNativeInline() { return nativeInline; }
271
272 public void setNativeInline(MyGame.Example.TestT nativeInline) { this.nativeInline = nativeInline; }
273
274 public long getLongEnumNonEnumDefault() { return longEnumNonEnumDefault; }
275
276 public void setLongEnumNonEnumDefault(long longEnumNonEnumDefault) { this.longEnumNonEnumDefault = longEnumNonEnumDefault; }
277
278 public long getLongEnumNormalDefault() { return longEnumNormalDefault; }
279
280 public void setLongEnumNormalDefault(long longEnumNormalDefault) { this.longEnumNormalDefault = longEnumNormalDefault; }
281
282 public float getNanDefault() { return nanDefault; }
283
284 public void setNanDefault(float nanDefault) { this.nanDefault = nanDefault; }
285
286 public float getInfDefault() { return infDefault; }
287
288 public void setInfDefault(float infDefault) { this.infDefault = infDefault; }
289
290 public float getPositiveInfDefault() { return positiveInfDefault; }
291
292 public void setPositiveInfDefault(float positiveInfDefault) { this.positiveInfDefault = positiveInfDefault; }
293
294 public float getInfinityDefault() { return infinityDefault; }
295
296 public void setInfinityDefault(float infinityDefault) { this.infinityDefault = infinityDefault; }
297
298 public float getPositiveInfinityDefault() { return positiveInfinityDefault; }
299
300 public void setPositiveInfinityDefault(float positiveInfinityDefault) { this.positiveInfinityDefault = positiveInfinityDefault; }
301
302 public float getNegativeInfDefault() { return negativeInfDefault; }
303
304 public void setNegativeInfDefault(float negativeInfDefault) { this.negativeInfDefault = negativeInfDefault; }
305
306 public float getNegativeInfinityDefault() { return negativeInfinityDefault; }
307
308 public void setNegativeInfinityDefault(float negativeInfinityDefault) { this.negativeInfinityDefault = negativeInfinityDefault; }
309
310 public double getDoubleInfDefault() { return doubleInfDefault; }
311
312 public void setDoubleInfDefault(double doubleInfDefault) { this.doubleInfDefault = doubleInfDefault; }
313
314
315 public MonsterT() {
316 this.pos = new MyGame.Example.Vec3T();
317 this.mana = 150;
318 this.hp = 100;
319 this.name = null;
320 this.inventory = null;
321 this.color = 8;
322 this.test = null;
323 this.test4 = null;
324 this.testarrayofstring = null;
325 this.testarrayoftables = null;
326 this.enemy = null;
327 this.testnestedflatbuffer = null;
328 this.testempty = null;
329 this.testbool = false;
330 this.testhashs32Fnv1 = 0;
331 this.testhashu32Fnv1 = 0L;
332 this.testhashs64Fnv1 = 0L;
333 this.testhashu64Fnv1 = 0L;
334 this.testhashs32Fnv1a = 0;
335 this.testhashu32Fnv1a = 0L;
336 this.testhashs64Fnv1a = 0L;
337 this.testhashu64Fnv1a = 0L;
338 this.testarrayofbools = null;
339 this.testf = 3.14159f;
340 this.testf2 = 3.0f;
341 this.testf3 = 0.0f;
342 this.testarrayofstring2 = null;
343 this.testarrayofsortedstruct = null;
344 this.flex = null;
345 this.test5 = null;
346 this.vectorOfLongs = null;
347 this.vectorOfDoubles = null;
348 this.parentNamespaceTest = null;
349 this.vectorOfReferrables = null;
350 this.singleWeakReference = 0L;
351 this.vectorOfWeakReferences = null;
352 this.vectorOfStrongReferrables = null;
353 this.coOwningReference = 0L;
354 this.vectorOfCoOwningReferences = null;
355 this.nonOwningReference = 0L;
356 this.vectorOfNonOwningReferences = null;
357 this.anyUnique = null;
358 this.anyAmbiguous = null;
359 this.vectorOfEnums = null;
360 this.signedEnum = -1;
361 this.testrequirednestedflatbuffer = null;
362 this.scalarKeySortedTables = null;
363 this.nativeInline = new MyGame.Example.TestT();
364 this.longEnumNonEnumDefault = 0L;
365 this.longEnumNormalDefault = 2L;
366 this.nanDefault = Float.NaN;
367 this.infDefault = Float.POSITIVE_INFINITY;
368 this.positiveInfDefault = Float.POSITIVE_INFINITY;
369 this.infinityDefault = Float.POSITIVE_INFINITY;
370 this.positiveInfinityDefault = Float.POSITIVE_INFINITY;
371 this.negativeInfDefault = Float.NEGATIVE_INFINITY;
372 this.negativeInfinityDefault = Float.NEGATIVE_INFINITY;
373 this.doubleInfDefault = Double.POSITIVE_INFINITY;
374 }
375 public static MonsterT deserializeFromBinary(byte[] fbBuffer) {
376 return Monster.getRootAsMonster(ByteBuffer.wrap(fbBuffer)).unpack();
377 }
378 public byte[] serializeToBinary() {
379 FlatBufferBuilder fbb = new FlatBufferBuilder();
380 Monster.finishMonsterBuffer(fbb, Monster.pack(fbb, this));
381 return fbb.sizedByteArray();
382 }
383}
384
View as plain text