mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
* [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521) * [Java] ObjectAPI implementation (#6521)
This commit is contained in:
@@ -16,7 +16,7 @@ final class TestSimpleTableWithEnum extends Table {
|
||||
public TestSimpleTableWithEnum __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int color() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 2; }
|
||||
public boolean mutateColor(int color) { int o = __offset(4); if (o != 0) { bb.put(o + bb_pos, (byte)color); return true; } else { return false; } }
|
||||
public boolean mutateColor(int color) { int o = __offset(4); if (o != 0) { bb.put(o + bb_pos, (byte) color); return true; } else { return false; } }
|
||||
|
||||
public static int createTestSimpleTableWithEnum(FlatBufferBuilder builder,
|
||||
int color) {
|
||||
@@ -26,7 +26,7 @@ final class TestSimpleTableWithEnum extends Table {
|
||||
}
|
||||
|
||||
public static void startTestSimpleTableWithEnum(FlatBufferBuilder builder) { builder.startTable(1); }
|
||||
public static void addColor(FlatBufferBuilder builder, int color) { builder.addByte(0, (byte)color, (byte)2); }
|
||||
public static void addColor(FlatBufferBuilder builder, int color) { builder.addByte(0, (byte) color, (byte) 2); }
|
||||
public static int endTestSimpleTableWithEnum(FlatBufferBuilder builder) {
|
||||
int o = builder.endTable();
|
||||
return o;
|
||||
@@ -38,5 +38,20 @@ final class TestSimpleTableWithEnum extends Table {
|
||||
public TestSimpleTableWithEnum get(int j) { return get(new TestSimpleTableWithEnum(), j); }
|
||||
public TestSimpleTableWithEnum get(TestSimpleTableWithEnum obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
|
||||
}
|
||||
public TestSimpleTableWithEnumT unpack() {
|
||||
TestSimpleTableWithEnumT _o = new TestSimpleTableWithEnumT();
|
||||
unpackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void unpackTo(TestSimpleTableWithEnumT _o) {
|
||||
int _oColor = color();
|
||||
_o.setColor(_oColor);
|
||||
}
|
||||
public static int pack(FlatBufferBuilder builder, TestSimpleTableWithEnumT _o) {
|
||||
if (_o == null) return 0;
|
||||
return createTestSimpleTableWithEnum(
|
||||
builder,
|
||||
_o.getColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user