Remove SchemaPath from TypeDefinition implementations
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / type / DerivedTypeBuilder.java
index 811c6ae316a137f1e4682bc7bdcd283535688669..07a8a9a1c89846a95f51d2951e8cf01e8efd3f9e 100644 (file)
@@ -12,7 +12,7 @@ import static java.util.Objects.requireNonNull;
 
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
-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.TypeDefinition;
 import org.slf4j.Logger;
@@ -31,8 +31,8 @@ public abstract class DerivedTypeBuilder<T extends TypeDefinition<T>> extends Ty
     private Status status = Status.CURRENT;
     private String units;
 
-    DerivedTypeBuilder(final T baseType, final SchemaPath path) {
-        super(requireNonNull(baseType), path);
+    DerivedTypeBuilder(final T baseType, final QName qname) {
+        super(requireNonNull(baseType), qname);
 
         checkArgument(baseType instanceof AbstractBaseType || baseType instanceof AbstractDerivedType
             || baseType instanceof AbstractRestrictedType,
@@ -66,7 +66,7 @@ public abstract class DerivedTypeBuilder<T extends TypeDefinition<T>> extends Ty
 
         final Optional<String> baseUnits = getBaseType().getUnits();
         if (baseUnits.isPresent() && !units.equals(baseUnits.get())) {
-            LOG.warn("Type {} uverrides 'units' of type {} to \"{}\"", getPath(), getBaseType(), units);
+            LOG.warn("Type {} uverrides 'units' of type {} to \"{}\"", getQName(), getBaseType(), units);
         }
 
         this.units = units;