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

@@ -41,5 +41,12 @@ public final class Vec3 extends Struct {
builder.putFloat(x);
return builder.offset();
}
public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
public Vec3 get(int j) { return get(new Vec3(), j); }
public Vec3 get(Vec3 obj, int j) { return obj.__assign(__element(j), bb); }
}
}