Binding generator v2 - Identity fix
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / java / org / opendaylight / mdsal / binding / javav2 / generator / impl / ModuleToGenType.java
index c0d7687ff98d64d18690ea13d1d388028ddc3a15..ab9567d2403ef981241a87644768abbe5c571b08 100644 (file)
@@ -12,6 +12,7 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static org.opendaylight.mdsal.binding.javav2.generator.impl.AuxiliaryGenUtils.createDescription;
 import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.groupingsToGenTypes;
 import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.moduleTypeBuilder;
+import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.processUsesImplements;
 import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.resolveNotification;
 import static org.opendaylight.mdsal.binding.javav2.generator.util.BindingTypes.NOTIFICATION_LISTENER;
 
@@ -142,10 +143,9 @@ final class ModuleToGenType {
         final String basePackageName = BindingMapping.getRootPackageName(module);
 
         if (schemaIdentities != null && !schemaIdentities.isEmpty()) {
-            Map<QName, GeneratedTOBuilderImpl> generatedIdentities = new HashMap<>();
             for (final IdentitySchemaNode identity : schemaIdentities) {
                 GenHelperUtil.identityToGenType(module, basePackageName, identity, schemaContext, genCtx,
-                    verboseClassComments, genTypeBuilders, typeProvider, generatedIdentities);
+                    verboseClassComments);
             }
         }
 
@@ -186,6 +186,7 @@ final class ModuleToGenType {
             if (notification != null) {
                 resolveNotification(listenerInterface, null, basePackageName, notification, module, schemaContext,
                         verboseClassComments, genTypeBuilders, typeProvider, genCtx);
+                processUsesImplements(notification, module, schemaContext, genCtx, BindingNamespaceType.Data);
             }
         }
 
@@ -202,6 +203,7 @@ final class ModuleToGenType {
                         resolveNotification(listenerInterface, potential.getQName().getLocalName(), basePackageName,
                                 tiedNotification, module, schemaContext, verboseClassComments, genTypeBuilders,
                                 typeProvider, genCtx);
+                        processUsesImplements(tiedNotification, module, schemaContext, genCtx, BindingNamespaceType.Data);
                     }
                 }
             }