Gen. Abstract*ModuleFactory with WORKING handleChangedClass()
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / java / JavaFileInputBuilder.java
index 588e218e629f25768d41a8c1fd9a8068c4aaf7aa..c498c5bf9fe9b702f6f7f0f835d9efde964a111d 100644 (file)
@@ -26,6 +26,8 @@ public class JavaFileInputBuilder {
 
     private final List<String> classAnnotations = new ArrayList<>();
 
+    private final List<FullyQualifiedName> importFQNs = new ArrayList<>();
+
     private final List<FullyQualifiedName> extendsFQNs = new ArrayList<>();
 
     private final List<FullyQualifiedName> implementsFQNs = new ArrayList<>();
@@ -44,6 +46,10 @@ public class JavaFileInputBuilder {
         classAnnotations.add(checkNotNull(annotation));
     }
 
+    public void addImportFQN(FullyQualifiedName fqn) {
+        importFQNs.add(fqn);
+    }
+
     public void addExtendsFQN(FullyQualifiedName fqn) {
         extendsFQNs.add(fqn);
     }
@@ -129,6 +135,11 @@ public class JavaFileInputBuilder {
                 return header;
             }
 
+            @Override
+            public List<FullyQualifiedName> getImports() {
+                return Collections.unmodifiableList(importFQNs);
+            }
+
             @Override
             public Optional<String> getClassJavaDoc() {
                 return classJavaDoc;
@@ -158,6 +169,7 @@ public class JavaFileInputBuilder {
             public List<String> getBodyElements() {
                 return Collections.unmodifiableList(bodyElements);
             }
+
         };
     }
 }