Remove SchemaPath from TypeDefinition implementations
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / type / LeafrefTypeBuilder.java
index 785924cbe667b9ed5c873ea3e84449d7d6111e59..b268fadb93a6f740ff8cce3a7c7ca7bea05ea300 100644 (file)
@@ -11,18 +11,18 @@ import static com.google.common.base.Preconditions.checkState;
 import static java.util.Objects.requireNonNull;
 
 import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.model.api.PathExpression;
 import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
 
 public final class LeafrefTypeBuilder extends RequireInstanceRestrictedTypeBuilder<LeafrefTypeDefinition> {
-    private RevisionAwareXPath pathStatement;
+    private PathExpression pathStatement;
 
-    LeafrefTypeBuilder(final SchemaPath path) {
-        super(null, path);
+    LeafrefTypeBuilder(final QName qname) {
+        super(null, qname);
     }
 
-    public LeafrefTypeBuilder setPathStatement(final @NonNull RevisionAwareXPath pathStatement) {
+    public LeafrefTypeBuilder setPathStatement(final @NonNull PathExpression pathStatement) {
         checkState(this.pathStatement == null, "Path statement already set to %s", this.pathStatement);
         this.pathStatement = requireNonNull(pathStatement);
         return this;
@@ -30,6 +30,6 @@ public final class LeafrefTypeBuilder extends RequireInstanceRestrictedTypeBuild
 
     @Override
     LeafrefTypeDefinition buildType() {
-        return new BaseLeafrefType(getPath(), pathStatement, getRequireInstance(), getUnknownSchemaNodes());
+        return new BaseLeafrefType(getQName(), pathStatement, getRequireInstance(), getUnknownSchemaNodes());
     }
 }