Add support for rebinding type definitions
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / type / DerivedBooleanType.java
index c018a7ad802535f1f36a6a9d1b0a2e8c5bd14fc0..a7ef7f7f561407c98d895fae9b7fffd412ab3ed9 100644 (file)
@@ -8,16 +8,25 @@
 package org.opendaylight.yangtools.yang.model.util.type;
 
 import java.util.Collection;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.Status;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.type.BooleanTypeDefinition;
 
 final class DerivedBooleanType extends AbstractDerivedType<BooleanTypeDefinition> implements BooleanTypeDefinition {
-    DerivedBooleanType(final BooleanTypeDefinition baseType, final SchemaPath path, final Object defaultValue,
-        final String description, final String reference, final Status status, final String units,
-        final Collection<UnknownSchemaNode> unknownSchemNodes) {
-        super(baseType, path, defaultValue, description, reference, status, units, unknownSchemNodes);
+    DerivedBooleanType(final BooleanTypeDefinition baseType, final QName qname, final Object defaultValue,
+            final String description, final String reference, final Status status, final String units,
+            final Collection<? extends UnknownSchemaNode> unknownSchemNodes) {
+        super(baseType, qname, defaultValue, description, reference, status, units, unknownSchemNodes);
+    }
+
+    private DerivedBooleanType(final DerivedBooleanType original, final QName qname) {
+        super(original, qname);
+    }
+
+    @Override
+    DerivedBooleanType bindTo(final QName newQName) {
+        return new DerivedBooleanType(this, newQName);
     }
 
     @Override