1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 package MyGame.Example; 4 5 import java.nio.*; 6 import java.lang.*; 7 import java.util.*; 8 import com.google.flatbuffers.*; 9 10 @SuppressWarnings("unused") 11 public final class NestedStruct extends Struct { __init(int _i, ByteBuffer _bb)12 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)13 public NestedStruct __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 14 a(int j)15 public int a(int j) { return bb.getInt(bb_pos + 0 + j * 4); } mutateA(int j, int a)16 public void mutateA(int j, int a) { bb.putInt(bb_pos + 0 + j * 4, a); } b()17 public byte b() { return bb.get(bb_pos + 8); } mutateB(byte b)18 public void mutateB(byte b) { bb.put(bb_pos + 8, b); } c(int j)19 public byte c(int j) { return bb.get(bb_pos + 9 + j * 1); } mutateC(int j, byte c)20 public void mutateC(int j, byte c) { bb.put(bb_pos + 9 + j * 1, c); } d(int j)21 public long d(int j) { return bb.getLong(bb_pos + 16 + j * 8); } mutateD(int j, long d)22 public void mutateD(int j, long d) { bb.putLong(bb_pos + 16 + j * 8, d); } 23 createNestedStruct(FlatBufferBuilder builder, int[] a, byte b, byte[] c, long[] d)24 public static int createNestedStruct(FlatBufferBuilder builder, int[] a, byte b, byte[] c, long[] d) { 25 builder.prep(8, 32); 26 for (int _idx0 = 2; _idx0 > 0; _idx0--) { 27 builder.putLong(d[_idx0-1]); 28 } 29 builder.pad(5); 30 for (int _idx0 = 2; _idx0 > 0; _idx0--) { 31 builder.putByte(c[_idx0-1]); 32 } 33 builder.putByte(b); 34 for (int _idx0 = 2; _idx0 > 0; _idx0--) { 35 builder.putInt(a[_idx0-1]); 36 } 37 return builder.offset(); 38 } 39 40 public static final class Vector extends BaseVector { __assign(int _vector, int _element_size, ByteBuffer _bb)41 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 42 get(int j)43 public NestedStruct get(int j) { return get(new NestedStruct(), j); } get(NestedStruct obj, int j)44 public NestedStruct get(NestedStruct obj, int j) { return obj.__assign(__element(j), bb); } 45 } 46 } 47 48