/** * produces the list of fields resulting from merging toMerge into the fields of this * @param toMerge the group containing the fields to merge * @return the merged list */ List<Type> mergeFields(GroupType toMerge) { return mergeFields(toMerge, true); }
@Override protected Type union(Type toMerge, boolean strict) { if (toMerge.isPrimitive()) { throw new IncompatibleSchemaModificationException("can not merge primitive type " + toMerge + " into group type " + this); } return new GroupType(toMerge.getRepetition(), getName(), mergeFields(toMerge.asGroupType())); }