Rework AugmentRuntimeType and Choice/Case linkage
[mdsal.git] / binding / mdsal-binding-generator / src / main / java / org / opendaylight / mdsal / binding / generator / impl / reactor / NotificationGenerator.java
index c2d4a3827564d33e8e7a0b53dab15d853e536af2..cc49b1d45516d4331fed3f62f1b096e09a132048 100644 (file)
@@ -58,14 +58,20 @@ final class NotificationGenerator
     }
 
     @Override
-    NotificationRuntimeType createRuntimeType(final GeneratedType type, final NotificationEffectiveStatement statement,
-            final List<RuntimeType> children, final List<AugmentRuntimeType> augments) {
-        return new DefaultNotificationRuntimeType(type, statement, children, augments);
+    void addAsGetterMethod(final GeneratedTypeBuilderBase<?> builder, final TypeBuilderFactory builderFactory) {
+        // Notifications are a distinct concept
     }
 
     @Override
-    void addAsGetterMethod(final GeneratedTypeBuilderBase<?> builder, final TypeBuilderFactory builderFactory) {
-        // Notifications are a distinct concept
+    CompositeRuntimeTypeBuilder<NotificationEffectiveStatement, NotificationRuntimeType> createBuilder(
+            final NotificationEffectiveStatement statement) {
+        return new CompositeRuntimeTypeBuilder<>(statement) {
+            @Override
+            NotificationRuntimeType build(final GeneratedType type, final NotificationEffectiveStatement statement,
+                    final List<RuntimeType> children, final List<AugmentRuntimeType> augments) {
+                return new DefaultNotificationRuntimeType(type, statement, children, augments);
+            }
+        };
     }
 
     private Type notificationType(final GeneratedTypeBuilder builder, final TypeBuilderFactory builderFactory) {