+++ /dev/null
-/*
- * Copyright (c) 2019 PANTHEON.tech, s.r.o. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.xpath.api;
-
-/**
- * Common interface for {@link ResolvedQNameReferent} and {@link UnresolvedQNameReferent}, ensuring that only one of
- * them is implemented by any class.
- *
- * @param <T> {@link QNameReferent} behavior subclass
- */
-interface QNameReferentBehavior<T extends QNameReferentBehavior<T>> extends QNameReferent {
-
-}
* @author Robert Varga
*/
@Beta
-public interface ResolvedQNameReferent extends QNameReferentBehavior<ResolvedQNameReferent> {
+public interface ResolvedQNameReferent extends QNameReferent {
/**
* Return the referenced QName.
*
package org.opendaylight.yangtools.yang.xpath.api;
import com.google.common.annotations.Beta;
+import org.opendaylight.yangtools.yang.common.UnresolvedQName;
/**
* A {@link QNameReferent} referencing an unresolved QName.
* @author Robert Varga
*/
@Beta
-public interface UnresolvedQNameReferent<T extends ResolvedQNameReferent> extends
- QNameReferentBehavior<UnresolvedQNameReferent<T>> {
-
+public interface UnresolvedQNameReferent extends QNameReferent {
+ @Override
+ UnresolvedQName getQName();
}
}
public static class UnresolvedQNameStep extends AbstractQNameStep<UnresolvedQName>
- implements UnresolvedQNameReferent<ResolvedQNameStep> {
+ implements UnresolvedQNameReferent {
private static final long serialVersionUID = 1L;
UnresolvedQNameStep(final YangXPathAxis axis, final UnresolvedQName qname) {
}
}
- public static final class Unresolved extends YangQNameExpr implements UnresolvedQNameReferent<Resolved> {
+ public static final class Unresolved extends YangQNameExpr implements UnresolvedQNameReferent {
private static final long serialVersionUID = 1L;
private final UnresolvedQName qname;