Merge "Bug 615: Removed xtend from Topology Manager"
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / ModuleField.java
index aff7af2811f061ba762d4789e088b4fb3c0c41f1..37d660353f55d1a5a418b8dac0213f6e630ba3e2 100644 (file)
@@ -20,10 +20,9 @@ public class ModuleField extends Field {
     private final boolean dependent, isListOfDependencies;
     private final Dependency dependency;
 
-    private ModuleField(List<String> modifiers, String type, String name,
-            String attributeName, String nullableDefault, boolean isDependency,
-            Dependency dependency, boolean isListOfDependencies) {
-        super(modifiers, type, name);
+    private ModuleField(List<String> modifiers, String type, String name, String attributeName, String nullableDefault,
+            boolean isDependency, Dependency dependency, boolean isListOfDependencies, boolean needsDepResolver) {
+        super(modifiers, type, name, null, needsDepResolver);
         this.dependent = isDependency;
         this.dependency = dependency;
         this.attributeName = attributeName;
@@ -35,10 +34,19 @@ public class ModuleField extends Field {
         this.isListOfDependencies = isListOfDependencies;
     }
 
-    public ModuleField(String type, String name, String attributeName,
-            String nullableDefault, boolean isDependency, Dependency dependency, boolean isListOfDependencies) {
-        this(Collections.<String> emptyList(), type, name, attributeName,
-                nullableDefault, isDependency, dependency, isListOfDependencies);
+    public ModuleField(String type, String name, String attributeName, String nullableDefault, boolean isDependency,
+            Dependency dependency, boolean isListOfDependencies, boolean needsDepResolve) {
+        this(Collections.<String> emptyList(), type, name, attributeName, nullableDefault, isDependency, dependency,
+                isListOfDependencies, needsDepResolve);
+    }
+
+    public boolean isIdentityRef() {
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return ModuleFieldSerializer.toString(this);
     }
 
     public Dependency getDependency() {
@@ -61,4 +69,9 @@ public class ModuleField extends Field {
         return attributeName;
     }
 
+
+    public boolean isList() {
+        return getType().startsWith("java.util.List");
+    }
+
 }