Added more tests for yang parser. Updated current tests.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-util / src / main / java / org / opendaylight / controller / yang / model / util / IdentityrefType.java
index 3837f72a8ae6d937e6d96f2e4c79da2865330a41..30f0013d240e7e713882eba614efd4d0cd467091 100644 (file)
@@ -21,19 +21,19 @@ import org.opendaylight.controller.yang.model.api.type.IdentityrefTypeDefinition
  *\r
  * @see IdentityrefTypeDefinition\r
  */\r
-public class IdentityrefType implements IdentityrefTypeDefinition {\r
-\r
+public final class IdentityrefType implements IdentityrefTypeDefinition {\r
     private final QName name = BaseTypes.constructQName("identityref");\r
-    private final SchemaPath path = BaseTypes.schemaPath(name);\r
+    private final SchemaPath path;\r
     private final String description = "The identityref type is used to reference an existing identity.";\r
     private final String reference = "https://tools.ietf.org/html/rfc6020#section-9.10";\r
-\r
+    private final IdentityrefTypeDefinition baseType;\r
     private final QName identity;\r
+    private final String units = "";\r
 \r
-    private String units = "";\r
-\r
-    public IdentityrefType(QName identity) {\r
+    public IdentityrefType(QName identity, SchemaPath schemaPath) {\r
         this.identity = identity;\r
+        this.path = schemaPath;\r
+        this.baseType = this;\r
     }\r
 \r
     @Override\r
@@ -83,7 +83,7 @@ public class IdentityrefType implements IdentityrefTypeDefinition {
 \r
     @Override\r
     public IdentityrefTypeDefinition getBaseType() {\r
-        return this;\r
+        return baseType;\r
     }\r
 \r
 }\r