Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 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 Test extends Struct { |
| 12 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } |
| 13 | public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 14 | |
| 15 | public short a() { return bb.getShort(bb_pos + 0); } |
| 16 | public void mutateA(short a) { bb.putShort(bb_pos + 0, a); } |
| 17 | public byte b() { return bb.get(bb_pos + 2); } |
| 18 | public void mutateB(byte b) { bb.put(bb_pos + 2, b); } |
| 19 | |
| 20 | public static int createTest(FlatBufferBuilder builder, short a, byte b) { |
| 21 | builder.prep(2, 4); |
| 22 | builder.pad(1); |
| 23 | builder.putByte(b); |
| 24 | builder.putShort(a); |
| 25 | return builder.offset(); |
| 26 | } |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame^] | 27 | |
| 28 | public static final class Vector extends BaseVector { |
| 29 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } |
| 30 | |
| 31 | public Test get(int j) { return get(new Test(), j); } |
| 32 | public Test get(Test obj, int j) { return obj.__assign(__element(j), bb); } |
| 33 | } |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 34 | } |
| 35 | |