Gen. Abstract*ModuleFactory with WORKING handleChangedClass()
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / java / GeneratedObjectBuilder.java
index c2aeb89..13418f3 100644 (file)
@@ -34,6 +34,17 @@ public class GeneratedObjectBuilder {
             content.append(input.getFQN().getPackageName());
             content.append(";\n");
         }
+
+        if (!input.getImports().isEmpty())
+            content.append('\n');
+        for (FullyQualifiedName importedType : input.getImports()) {
+            content.append("import ");
+            content.append(importedType.toString());
+            content.append(";\n");
+        }
+        if (!input.getImports().isEmpty())
+            content.append('\n');
+
         content.append(maybeAddComment(input.getClassJavaDoc(), true));
 
         for (String classAnnotation : input.getClassAnnotations()) {
@@ -64,7 +75,6 @@ public class GeneratedObjectBuilder {
     }
 
     private static String maybeAddComment(Optional<String> comment, boolean isJavadoc) {
-
         if (comment.isPresent()) {
             String input = comment.get();
             return StringUtil.writeComment(input, isJavadoc);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.