X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-generator-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fsal%2Fbinding%2Fgenerator%2Fimpl%2FModuleContext.java;h=5ac14335f440767f93d4b1e89e5a14014c596b14;hb=9996417cb9569e39e2aed4a82a9b69a2fc9ab583;hp=aac2135c7d8d7023e32c1543c151027222e23c58;hpb=6f071d8474f75208e112f542d2759147889fe978;p=mdsal.git diff --git a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleContext.java b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleContext.java index aac2135c7d..5ac14335f4 100644 --- a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleContext.java +++ b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleContext.java @@ -34,23 +34,22 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition; public final class ModuleContext { private GeneratedTypeBuilder moduleNode; - private final List genTOs = new ArrayList(); - private final Map typedefs = new HashMap(); - private final Map childNodes = new HashMap(); - private final Map groupings = new HashMap(); - private final Map cases = new HashMap(); + private final List genTOs = new ArrayList<>(); + private final Map typedefs = new HashMap<>(); + private final Map childNodes = new HashMap<>(); + private final Map groupings = new HashMap<>(); + private final Map cases = new HashMap<>(); private final Map identities = new HashMap<>(); - private final Set topLevelNodes = new HashSet(); - private final List augmentations = new ArrayList(); - private final BiMap typeToAugmentation = HashBiMap.create(); + private final Set topLevelNodes = new HashSet<>(); + private final List augmentations = new ArrayList<>(); + private final BiMap typeToAugmentation = HashBiMap.create(); private final Map typeToSchema = new HashMap<>(); private final Multimap choiceToCases = HashMultimap.create(); - private final BiMap caseTypeToSchema = HashBiMap.create(); + private final BiMap caseTypeToSchema = HashBiMap.create(); - private final Multimap augmentableToAugmentations = HashMultimap.create(); private final Map innerTypes = new HashMap<>(); List getGeneratedTypes() { @@ -93,10 +92,6 @@ public final class ModuleContext { return Multimaps.unmodifiableMultimap(choiceToCases); } - public Multimap getAugmentableToAugmentations() { - return Multimaps.unmodifiableMultimap(augmentableToAugmentations); - } - public GeneratedTypeBuilder getModuleNode() { return moduleNode; } @@ -183,12 +178,8 @@ public final class ModuleContext { } public void addTypeToAugmentation(final GeneratedTypeBuilder builder, final AugmentationSchema schema) { - typeToAugmentation.put(builder, schema); - typeToSchema.put(builder, schema); - } - - public void addTargetToAugmentation(final Type target, final GeneratedTypeBuilder augmentation) { - augmentableToAugmentations.put(target,augmentation); + typeToAugmentation.put(builder, schema); + typeToSchema.put(builder, schema); } public void addChoiceToCaseMapping(final Type choiceType, final Type caseType, final ChoiceCaseNode schema) { @@ -207,7 +198,7 @@ public final class ModuleContext { * * Valid values are only instances of {@link DataSchemaNode} or {@link AugmentationSchema} * - * @return + * @return Mapping from type to corresponding schema */ public Map getTypeToSchema() { return Collections.unmodifiableMap(typeToSchema);