blob: 3c8a8f6810c17a6627355005fd6ca72d18b7b578 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import java.nio.*;
6import java.lang.*;
7import java.util.*;
8import com.google.flatbuffers.*;
9
10@SuppressWarnings("unused")
11public final class NestedStruct extends Struct {
12 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
13 public NestedStruct __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
14
15 public int a(int j) { return bb.getInt(bb_pos + 0 + j * 4); }
16 public void mutateA(int j, int a) { bb.putInt(bb_pos + 0 + j * 4, a); }
17 public byte b() { return bb.get(bb_pos + 8); }
18 public void mutateB(byte b) { bb.put(bb_pos + 8, b); }
19 public byte c(int j) { return bb.get(bb_pos + 9 + j * 1); }
20 public void mutateC(int j, byte c) { bb.put(bb_pos + 9 + j * 1, c); }
21
22 public static int createNestedStruct(FlatBufferBuilder builder, int[] a, byte b, byte[] c) {
23 builder.prep(4, 12);
24 builder.pad(1);
25 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
26 builder.putByte(c[_idx0-1]);
27 }
28 builder.putByte(b);
29 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
30 builder.putInt(a[_idx0-1]);
31 }
32 return builder.offset();
33 }
34}
35