Skip to content

Commit 049e485

Browse files
committed
Update generated test code with naming fixes
1 parent bca6f36 commit 049e485

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+147
-204
lines changed

java/src/main/java/com/google/flatbuffers/reflection/Enum.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import com.google.flatbuffers.ShortVector;
1515
import com.google.flatbuffers.StringVector;
1616
import com.google.flatbuffers.Struct;
17-
import com.google.flatbuffers.Table;
1817
import com.google.flatbuffers.UnionVector;
1918
import java.nio.ByteBuffer;
2019
import java.nio.ByteOrder;
2120

2221
@SuppressWarnings("unused")
23-
public final class Enum extends Table {
22+
public final class Enum extends com.google.flatbuffers.Table {
2423
public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
2524
public static Enum getRootAsEnum(ByteBuffer _bb) { return getRootAsEnum(_bb, new Enum()); }
2625
public static Enum getRootAsEnum(ByteBuffer _bb, Enum obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
@@ -35,8 +34,8 @@ public final class Enum extends Table {
3534
public int valuesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
3635
public com.google.flatbuffers.reflection.EnumVal valuesByKey(long key) { int o = __offset(6); return o != 0 ? com.google.flatbuffers.reflection.EnumVal.__lookup_by_key(null, __vector(o), key, bb) : null; }
3736
public com.google.flatbuffers.reflection.EnumVal valuesByKey(com.google.flatbuffers.reflection.EnumVal obj, long key) { int o = __offset(6); return o != 0 ? com.google.flatbuffers.reflection.EnumVal.__lookup_by_key(obj, __vector(o), key, bb) : null; }
38-
public com.google.flatbuffers.reflection.EnumVal.Vector valuesVector() { return valuesVector(new com.google.flatbuffers.reflection.EnumVal.Vector()); }
39-
public com.google.flatbuffers.reflection.EnumVal.Vector valuesVector(com.google.flatbuffers.reflection.EnumVal.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
37+
public com.google.flatbuffers.reflection.EnumVal._Vector valuesVector() { return valuesVector(new com.google.flatbuffers.reflection.EnumVal._Vector()); }
38+
public com.google.flatbuffers.reflection.EnumVal._Vector valuesVector(com.google.flatbuffers.reflection.EnumVal._Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
4039
public boolean isUnion() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
4140
public com.google.flatbuffers.reflection.Type underlyingType() { return underlyingType(new com.google.flatbuffers.reflection.Type()); }
4241
public com.google.flatbuffers.reflection.Type underlyingType(com.google.flatbuffers.reflection.Type obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
@@ -45,8 +44,8 @@ public final class Enum extends Table {
4544
public int attributesLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; }
4645
public com.google.flatbuffers.reflection.KeyValue attributesByKey(String key) { int o = __offset(12); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(null, __vector(o), key, bb) : null; }
4746
public com.google.flatbuffers.reflection.KeyValue attributesByKey(com.google.flatbuffers.reflection.KeyValue obj, String key) { int o = __offset(12); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(obj, __vector(o), key, bb) : null; }
48-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue.Vector()); }
49-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector(com.google.flatbuffers.reflection.KeyValue.Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
47+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue._Vector()); }
48+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector(com.google.flatbuffers.reflection.KeyValue._Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
5049
public String documentation(int j) { int o = __offset(14); return o != 0 ? __string(__vector(o) + j * 4) : null; }
5150
public int documentationLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
5251
public StringVector documentationVector() { return documentationVector(new StringVector()); }
@@ -123,8 +122,8 @@ public static Enum __lookup_by_key(Enum obj, int vectorLocation, String key, Byt
123122
return null;
124123
}
125124

126-
public static final class Vector extends BaseVector {
127-
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
125+
public static final class _Vector extends BaseVector {
126+
public _Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
128127

129128
public Enum get(int j) { return get(new Enum(), j); }
130129
public Enum get(Enum obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }

java/src/main/java/com/google/flatbuffers/reflection/EnumVal.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import com.google.flatbuffers.ShortVector;
1515
import com.google.flatbuffers.StringVector;
1616
import com.google.flatbuffers.Struct;
17-
import com.google.flatbuffers.Table;
1817
import com.google.flatbuffers.UnionVector;
1918
import java.nio.ByteBuffer;
2019
import java.nio.ByteOrder;
2120

2221
@SuppressWarnings("unused")
23-
public final class EnumVal extends Table {
22+
public final class EnumVal extends com.google.flatbuffers.Table {
2423
public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
2524
public static EnumVal getRootAsEnumVal(ByteBuffer _bb) { return getRootAsEnumVal(_bb, new EnumVal()); }
2625
public static EnumVal getRootAsEnumVal(ByteBuffer _bb, EnumVal obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
@@ -42,8 +41,8 @@ public final class EnumVal extends Table {
4241
public int attributesLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
4342
public com.google.flatbuffers.reflection.KeyValue attributesByKey(String key) { int o = __offset(14); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(null, __vector(o), key, bb) : null; }
4443
public com.google.flatbuffers.reflection.KeyValue attributesByKey(com.google.flatbuffers.reflection.KeyValue obj, String key) { int o = __offset(14); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(obj, __vector(o), key, bb) : null; }
45-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue.Vector()); }
46-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector(com.google.flatbuffers.reflection.KeyValue.Vector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
44+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue._Vector()); }
45+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector(com.google.flatbuffers.reflection.KeyValue._Vector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
4746

4847
public static int createEnumVal(FlatBufferBuilder builder,
4948
int nameOffset,
@@ -104,8 +103,8 @@ public static EnumVal __lookup_by_key(EnumVal obj, int vectorLocation, long key,
104103
return null;
105104
}
106105

107-
public static final class Vector extends BaseVector {
108-
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
106+
public static final class _Vector extends BaseVector {
107+
public _Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
109108

110109
public EnumVal get(int j) { return get(new EnumVal(), j); }
111110
public EnumVal get(EnumVal obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }

java/src/main/java/com/google/flatbuffers/reflection/Field.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import com.google.flatbuffers.ShortVector;
1515
import com.google.flatbuffers.StringVector;
1616
import com.google.flatbuffers.Struct;
17-
import com.google.flatbuffers.Table;
1817
import com.google.flatbuffers.UnionVector;
1918
import java.nio.ByteBuffer;
2019
import java.nio.ByteOrder;
2120

2221
@SuppressWarnings("unused")
23-
public final class Field extends Table {
22+
public final class Field extends com.google.flatbuffers.Table {
2423
public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
2524
public static Field getRootAsField(ByteBuffer _bb) { return getRootAsField(_bb, new Field()); }
2625
public static Field getRootAsField(ByteBuffer _bb, Field obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
@@ -44,8 +43,8 @@ public final class Field extends Table {
4443
public int attributesLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; }
4544
public com.google.flatbuffers.reflection.KeyValue attributesByKey(String key) { int o = __offset(22); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(null, __vector(o), key, bb) : null; }
4645
public com.google.flatbuffers.reflection.KeyValue attributesByKey(com.google.flatbuffers.reflection.KeyValue obj, String key) { int o = __offset(22); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(obj, __vector(o), key, bb) : null; }
47-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue.Vector()); }
48-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector(com.google.flatbuffers.reflection.KeyValue.Vector obj) { int o = __offset(22); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
46+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue._Vector()); }
47+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector(com.google.flatbuffers.reflection.KeyValue._Vector obj) { int o = __offset(22); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
4948
public String documentation(int j) { int o = __offset(24); return o != 0 ? __string(__vector(o) + j * 4) : null; }
5049
public int documentationLength() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; }
5150
public StringVector documentationVector() { return documentationVector(new StringVector()); }
@@ -143,8 +142,8 @@ public static Field __lookup_by_key(Field obj, int vectorLocation, String key, B
143142
return null;
144143
}
145144

146-
public static final class Vector extends BaseVector {
147-
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
145+
public static final class _Vector extends BaseVector {
146+
public _Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
148147

149148
public Field get(int j) { return get(new Field(), j); }
150149
public Field get(Field obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }

java/src/main/java/com/google/flatbuffers/reflection/KeyValue.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import com.google.flatbuffers.ShortVector;
1515
import com.google.flatbuffers.StringVector;
1616
import com.google.flatbuffers.Struct;
17-
import com.google.flatbuffers.Table;
1817
import com.google.flatbuffers.UnionVector;
1918
import java.nio.ByteBuffer;
2019
import java.nio.ByteOrder;
2120

2221
@SuppressWarnings("unused")
23-
public final class KeyValue extends Table {
22+
public final class KeyValue extends com.google.flatbuffers.Table {
2423
public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
2524
public static KeyValue getRootAsKeyValue(ByteBuffer _bb) { return getRootAsKeyValue(_bb, new KeyValue()); }
2625
public static KeyValue getRootAsKeyValue(ByteBuffer _bb, KeyValue obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
@@ -76,8 +75,8 @@ public static KeyValue __lookup_by_key(KeyValue obj, int vectorLocation, String
7675
return null;
7776
}
7877

79-
public static final class Vector extends BaseVector {
80-
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
78+
public static final class _Vector extends BaseVector {
79+
public _Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
8180

8281
public KeyValue get(int j) { return get(new KeyValue(), j); }
8382
public KeyValue get(KeyValue obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }

java/src/main/java/com/google/flatbuffers/reflection/Object.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import com.google.flatbuffers.ShortVector;
1515
import com.google.flatbuffers.StringVector;
1616
import com.google.flatbuffers.Struct;
17-
import com.google.flatbuffers.Table;
1817
import com.google.flatbuffers.UnionVector;
1918
import java.nio.ByteBuffer;
2019
import java.nio.ByteOrder;
2120

2221
@SuppressWarnings("unused")
23-
public final class Object extends Table {
22+
public final class Object extends com.google.flatbuffers.Table {
2423
public static void ValidateVersion() { Constants.FLATBUFFERS_25_2_10(); }
2524
public static Object getRootAsObject(ByteBuffer _bb) { return getRootAsObject(_bb, new Object()); }
2625
public static Object getRootAsObject(ByteBuffer _bb, Object obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
@@ -35,8 +34,8 @@ public final class Object extends Table {
3534
public int fieldsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
3635
public com.google.flatbuffers.reflection.Field fieldsByKey(String key) { int o = __offset(6); return o != 0 ? com.google.flatbuffers.reflection.Field.__lookup_by_key(null, __vector(o), key, bb) : null; }
3736
public com.google.flatbuffers.reflection.Field fieldsByKey(com.google.flatbuffers.reflection.Field obj, String key) { int o = __offset(6); return o != 0 ? com.google.flatbuffers.reflection.Field.__lookup_by_key(obj, __vector(o), key, bb) : null; }
38-
public com.google.flatbuffers.reflection.Field.Vector fieldsVector() { return fieldsVector(new com.google.flatbuffers.reflection.Field.Vector()); }
39-
public com.google.flatbuffers.reflection.Field.Vector fieldsVector(com.google.flatbuffers.reflection.Field.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
37+
public com.google.flatbuffers.reflection.Field._Vector fieldsVector() { return fieldsVector(new com.google.flatbuffers.reflection.Field._Vector()); }
38+
public com.google.flatbuffers.reflection.Field._Vector fieldsVector(com.google.flatbuffers.reflection.Field._Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
4039
public boolean isStruct() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
4140
public int minalign() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
4241
public int bytesize() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
@@ -45,8 +44,8 @@ public final class Object extends Table {
4544
public int attributesLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
4645
public com.google.flatbuffers.reflection.KeyValue attributesByKey(String key) { int o = __offset(14); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(null, __vector(o), key, bb) : null; }
4746
public com.google.flatbuffers.reflection.KeyValue attributesByKey(com.google.flatbuffers.reflection.KeyValue obj, String key) { int o = __offset(14); return o != 0 ? com.google.flatbuffers.reflection.KeyValue.__lookup_by_key(obj, __vector(o), key, bb) : null; }
48-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue.Vector()); }
49-
public com.google.flatbuffers.reflection.KeyValue.Vector attributesVector(com.google.flatbuffers.reflection.KeyValue.Vector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
47+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector() { return attributesVector(new com.google.flatbuffers.reflection.KeyValue._Vector()); }
48+
public com.google.flatbuffers.reflection.KeyValue._Vector attributesVector(com.google.flatbuffers.reflection.KeyValue._Vector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
5049
public String documentation(int j) { int o = __offset(16); return o != 0 ? __string(__vector(o) + j * 4) : null; }
5150
public int documentationLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; }
5251
public StringVector documentationVector() { return documentationVector(new StringVector()); }
@@ -125,8 +124,8 @@ public static Object __lookup_by_key(Object obj, int vectorLocation, String key,
125124
return null;
126125
}
127126

128-
public static final class Vector extends BaseVector {
129-
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
127+
public static final class _Vector extends BaseVector {
128+
public _Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
130129

131130
public Object get(int j) { return get(new Object(), j); }
132131
public Object get(Object obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }

0 commit comments

Comments
 (0)