[Java] ObjectAPI implementation (#6521) (#6582)

* [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:
ofirm93
2021-06-04 00:17:40 +03:00
committed by GitHub
parent baaffbaedd
commit 7c3e267e1e
77 changed files with 3538 additions and 238 deletions

View File

@@ -41,5 +41,43 @@ public final class TableInFirstNS extends Table {
public TableInFirstNS get(int j) { return get(new TableInFirstNS(), j); }
public TableInFirstNS get(TableInFirstNS obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public TableInFirstNST unpack() {
TableInFirstNST _o = new TableInFirstNST();
unpackTo(_o);
return _o;
}
public void unpackTo(TableInFirstNST _o) {
if (fooTable() != null) _o.setFooTable(fooTable().unpack());
else _o.setFooTable(null);
byte _oFooEnum = fooEnum();
_o.setFooEnum(_oFooEnum);
NamespaceA.NamespaceB.UnionInNestedNSUnion _oFooUnion = new NamespaceA.NamespaceB.UnionInNestedNSUnion();
byte _oFooUnionType = fooUnionType();
_oFooUnion.setType(_oFooUnionType);
Table _oFooUnionValue;
switch (_oFooUnionType) {
case NamespaceA.NamespaceB.UnionInNestedNS.TableInNestedNS:
_oFooUnionValue = fooUnion(new NamespaceA.NamespaceB.TableInNestedNS());
_oFooUnion.setValue(_oFooUnionValue != null ? ((NamespaceA.NamespaceB.TableInNestedNS) _oFooUnionValue).unpack() : null);
break;
default: break;
}
_o.setFooUnion(_oFooUnion);
if (fooStruct() != null) fooStruct().unpackTo(_o.getFooStruct());
else _o.setFooStruct(null);
}
public static int pack(FlatBufferBuilder builder, TableInFirstNST _o) {
if (_o == null) return 0;
int _foo_table = _o.getFooTable() == null ? 0 : NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.getFooTable());
byte _fooUnionType = _o.getFooUnion() == null ? NamespaceA.NamespaceB.UnionInNestedNS.NONE : _o.getFooUnion().getType();
int _fooUnion = _o.getFooUnion() == null ? 0 : NamespaceA.NamespaceB.UnionInNestedNSUnion.pack(builder, _o.getFooUnion());
startTableInFirstNS(builder);
addFooTable(builder, _foo_table);
addFooEnum(builder, _o.getFooEnum());
addFooUnionType(builder, _fooUnionType);
addFooUnion(builder, _fooUnion);
addFooStruct(builder, NamespaceA.NamespaceB.StructInNestedNS.pack(builder, _o.getFooStruct()));
return endTableInFirstNS(builder);
}
}