public FieldType getSingleType() { if (isArrayType()) { // GOTCHA: Wont' work if you add more types!!! return get((byte) (getId() % TYPES_COUNT)); } return this; }
public FieldType getSingleType() { if (isArrayType()) { // GOTCHA: Wont' work if you add more types!!! return get((byte) (getId() % TYPES_COUNT)); } return this; }
/** * @param cd given classDefinition to validate against * @param fd given fieldDefinition to validate against * @param fullPath full path - just for output * @throws IllegalArgumentException if the current field definition is not of an array type */ static void validateArrayType(ClassDefinition cd, FieldDefinition fd, String fullPath) { if (!fd.getType().isArrayType()) { throw new IllegalArgumentException("Wrong use of array operator: '" + fullPath + "' for ClassDefinition {id: " + cd.getClassId() + ", version: " + cd.getVersion() + "}"); } }
/** * @param cd given classDefinition to validate against * @param fd given fieldDefinition to validate against * @param fullPath full path - just for output * @throws IllegalArgumentException if the current field definition is not of an array type */ static void validateArrayType(ClassDefinition cd, FieldDefinition fd, String fullPath) { if (!fd.getType().isArrayType()) { throw new IllegalArgumentException("Wrong use of array operator: '" + fullPath + "' for ClassDefinition {id: " + cd.getClassId() + ", version: " + cd.getVersion() + "}"); } }
PortableNavigatorContext ctx, PortablePathCursor path, int index) throws IOException { FieldType type = ctx.getCurrentFieldType(); if (type.isArrayType()) { if (type == FieldType.PORTABLE_ARRAY) { return createPositionForReadAccessInPortableArray(ctx, path, index);
PortableNavigatorContext ctx, PortablePathCursor path, int index) throws IOException { FieldType type = ctx.getCurrentFieldType(); if (type.isArrayType()) { if (type == FieldType.PORTABLE_ARRAY) { return createPositionForReadAccessInPortableArray(ctx, path, index);