Java: Added access object for vector of struct and vector of tables. (#5233)

* Java: Added access object for vector of struct and vector of tables.

* Java: Workarounds removed when accessing the union vector.
This commit is contained in:
Kulikov Alexey
2019-09-23 23:22:43 +07:00
committed by Wouter van Oortmerssen
parent 97f3aa9174
commit e365c502ff
40 changed files with 989 additions and 21 deletions

View File

@@ -152,9 +152,8 @@ namespace FlatBuffers
// Initialize any Table-derived type to point to the union at the given offset.
public T __union<T>(int offset) where T : struct, IFlatbufferObject
{
offset += bb_pos;
T t = new T();
t.__init(offset + bb.GetInt(offset), bb);
t.__init(__indirect(offset), bb);
return t;
}