private final Map<QName,GeneratedTOBuilder> identities = new HashMap<>();
private final Set<GeneratedTypeBuilder> topLevelNodes = new HashSet<>();
private final List<GeneratedTypeBuilder> augmentations = new ArrayList<>();
- private final BiMap<Type, AugmentationSchemaNode> typeToAugmentation = HashBiMap.create();
+ private final Multimap<Type,AugmentationSchemaNode> typeToAugmentations = HashMultimap.create();
private final BiMap<SchemaPath,Type> targetToAugmentation = HashBiMap.create();
private final Map<Type,Object> typeToSchema = new HashMap<>();
private final Multimap<Type, Type> choiceToCases = HashMultimap.create();
return Collections.unmodifiableList(this.augmentations);
}
- public BiMap<Type, AugmentationSchemaNode> getTypeToAugmentation() {
- return Maps.unmodifiableBiMap(this.typeToAugmentation);
+ public Multimap<Type, AugmentationSchemaNode> getTypeToAugmentations() {
+ return Multimaps.unmodifiableMultimap(this.typeToAugmentations);
}
public BiMap<SchemaPath, Type> getTargetToAugmentation() {
}
public void addTypeToAugmentation(final GeneratedTypeBuilder builder, final AugmentationSchemaNode schema) {
- this.typeToAugmentation.put(builder, schema);
this.typeToSchema.put(builder, schema);
}
+ public void addTypeToAugmentations(final GeneratedTypeBuilder builder,
+ final List<AugmentationSchemaNode> schemaList) {
+ schemaList.forEach(augmentNode -> this.typeToAugmentations.put(builder, augmentNode));
+ }
+
public void addTargetToAugmentation(final GeneratedTypeBuilder builder, final SchemaPath augmentTarget) {
this.targetToAugmentation.put(augmentTarget, builder);
}