Modified construction of built-in yang types.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-util / src / main / java / org / opendaylight / controller / yang / model / util / EmptyType.java
index 9a7b13ddb3e0e9f34c611111348169a7b558dc9b..0e542bc019f3e5fa043fc8fe769bf5457df9d6ea 100644 (file)
@@ -16,16 +16,21 @@ import org.opendaylight.controller.yang.model.api.Status;
 import org.opendaylight.controller.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.controller.yang.model.api.type.EmptyTypeDefinition;
 
-public class EmptyType implements EmptyTypeDefinition {
-
+public final class EmptyType implements EmptyTypeDefinition {
     private final QName name = BaseTypes.constructQName("empty");
-    private final SchemaPath path = BaseTypes.schemaPath(name);
+    private final SchemaPath path;
     private final String description = "The empty built-in type represents a leaf that does not have any value, it conveys information by its presence or absence.";
     private final String reference = "https://tools.ietf.org/html/rfc6020#page-131";
+    private final EmptyTypeDefinition baseType;
+
+    public EmptyType(final SchemaPath path) {
+        this.path = path;
+        this.baseType = this;
+    }
 
     @Override
     public EmptyTypeDefinition getBaseType() {
-        return this;
+        return baseType;
     }
 
     @Override