mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 10:15:06 +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:
@@ -2,6 +2,7 @@
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class EnumInNestedNS {
|
||||
private EnumInNestedNS() { }
|
||||
public static final byte A = 0;
|
||||
|
||||
@@ -30,5 +30,23 @@ public final class StructInNestedNS extends Struct {
|
||||
public StructInNestedNS get(int j) { return get(new StructInNestedNS(), j); }
|
||||
public StructInNestedNS get(StructInNestedNS obj, int j) { return obj.__assign(__element(j), bb); }
|
||||
}
|
||||
public StructInNestedNST unpack() {
|
||||
StructInNestedNST _o = new StructInNestedNST();
|
||||
unpackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void unpackTo(StructInNestedNST _o) {
|
||||
int _oA = a();
|
||||
_o.setA(_oA);
|
||||
int _oB = b();
|
||||
_o.setB(_oB);
|
||||
}
|
||||
public static int pack(FlatBufferBuilder builder, StructInNestedNST _o) {
|
||||
if (_o == null) return 0;
|
||||
return createStructInNestedNS(
|
||||
builder,
|
||||
_o.getA(),
|
||||
_o.getB());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class StructInNestedNST {
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
public int getA() { return a; }
|
||||
|
||||
public void setA(int a) { this.a = a; }
|
||||
|
||||
public int getB() { return b; }
|
||||
|
||||
public void setB(int b) { this.b = b; }
|
||||
|
||||
|
||||
public StructInNestedNST() {
|
||||
this.a = 0;
|
||||
this.b = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,5 +38,20 @@ public final class TableInNestedNS extends Table {
|
||||
public TableInNestedNS get(int j) { return get(new TableInNestedNS(), j); }
|
||||
public TableInNestedNS get(TableInNestedNS obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
|
||||
}
|
||||
public TableInNestedNST unpack() {
|
||||
TableInNestedNST _o = new TableInNestedNST();
|
||||
unpackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void unpackTo(TableInNestedNST _o) {
|
||||
int _oFoo = foo();
|
||||
_o.setFoo(_oFoo);
|
||||
}
|
||||
public static int pack(FlatBufferBuilder builder, TableInNestedNST _o) {
|
||||
if (_o == null) return 0;
|
||||
return createTableInNestedNS(
|
||||
builder,
|
||||
_o.getFoo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class TableInNestedNST {
|
||||
private int foo;
|
||||
|
||||
public int getFoo() { return foo; }
|
||||
|
||||
public void setFoo(int foo) { this.foo = foo; }
|
||||
|
||||
|
||||
public TableInNestedNST() {
|
||||
this.foo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class UnionInNestedNS {
|
||||
private UnionInNestedNS() { }
|
||||
public static final byte NONE = 0;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
|
||||
public class UnionInNestedNSUnion {
|
||||
private byte type;
|
||||
private Object value;
|
||||
|
||||
public byte getType() { return type; }
|
||||
|
||||
public void setType(byte type) { this.type = type; }
|
||||
|
||||
public Object getValue() { return value; }
|
||||
|
||||
public void setValue(Object value) { this.value = value; }
|
||||
|
||||
public UnionInNestedNSUnion() {
|
||||
this.type = UnionInNestedNS.NONE;
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
public NamespaceA.NamespaceB.TableInNestedNST asTableInNestedNS() { return (NamespaceA.NamespaceB.TableInNestedNST) value; }
|
||||
|
||||
public static int pack(FlatBufferBuilder builder, UnionInNestedNSUnion _o) {
|
||||
switch (_o.type) {
|
||||
case UnionInNestedNS.TableInNestedNS: return NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.asTableInNestedNS());
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user