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;
@Override
LeafrefTypeDefinition buildType() {
- return new BaseLeafrefType(getPath(), pathStatement, getRequireInstance(), getUnknownSchemaNodes());
+ return new BaseLeafrefType(getQName(), pathStatement, getRequireInstance(), getUnknownSchemaNodes());
}
}