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) { bb_pos = _i; bb = _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 } 27 } 28 29