Class UnresolvedQName
java.lang.Object
org.opendaylight.yangtools.yang.common.AbstractQName
org.opendaylight.yangtools.yang.common.UnresolvedQName
- All Implemented Interfaces:
Serializable
,Identifier
,Immutable
,WritableObject
- Direct Known Subclasses:
UnresolvedQName.Qualified
,UnresolvedQName.Unqualified
@NonNullByDefault
public abstract sealed class UnresolvedQName
extends AbstractQName
permits UnresolvedQName.Unqualified, UnresolvedQName.Qualified
A
QName
equivalent which has not been resolved. There are two subclasses:
UnresolvedQName.Unqualified
, which holds only a local name available throughAbstractQName.getLocalName()
.UnresolvedQName.Qualified
, which also holds a string prefix available viaUnresolvedQName.Qualified.getPrefix()
.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionabstract @Nullable String
Return the prefix of this unresolved QName.abstract UnresolvedQName
intern()
Return an interned reference to an equivalent object.static UnresolvedQName.Qualified
Deprecated, for removal: This API element is subject to removal in a future version.static @Nullable UnresolvedQName.Unqualified
tryLocalName
(String localName) Try to create a new unqualified QName.static UnresolvedQName.Unqualified
unqualified
(String localName) Deprecated, for removal: This API element is subject to removal in a future version.UseUnresolvedQName.Unqualified.of(String)
instead.abstract UnresolvedQName.Qualified
withPrefix
(String newPrefix) Return aUnresolvedQName.Qualified
object bound to specifiedprefix
.Methods inherited from class org.opendaylight.yangtools.yang.common.AbstractQName
bindTo, equals, getLocalName, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.concepts.WritableObject
writeTo
-
Method Details
-
qualified
@Deprecated(since="9.0.0", forRemoval=true) public static UnresolvedQName.Qualified qualified(String prefix, String localName) Deprecated, for removal: This API element is subject to removal in a future version.UseUnresolvedQName.Qualified.of(String, String)
instead.Create a new qualified unresolved QName.- Parameters:
prefix
- The prefix on this qualified QNamelocalName
- The local name of this qualified QName- Returns:
- An UnqualifiedQName instance
- Throws:
NullPointerException
- if any argument isnull
IllegalArgumentException
- iflocalName
is not a valid YANG identifier
-
unqualified
@Deprecated(since="9.0.0", forRemoval=true) public static UnresolvedQName.Unqualified unqualified(String localName) Deprecated, for removal: This API element is subject to removal in a future version.UseUnresolvedQName.Unqualified.of(String)
instead.Create a new unqualified unresolved QName.- Parameters:
localName
- The local name of this unqualified QName- Returns:
- An UnqualifiedQName instance
- Throws:
NullPointerException
- if localName isnull
IllegalArgumentException
- iflocalName
is not a valid YANG identifier
-
tryLocalName
Try to create a new unqualified QName.- Parameters:
localName
- The local name of this unqualified QName- Returns:
- An UnqualifiedQName instance, or null if localName is not valid
-
intern
Description copied from class:AbstractQName
Return an interned reference to an equivalent object.- Specified by:
intern
in classAbstractQName
- Returns:
- Interned reference, or this object if it was interned.
-
getPrefix
Return the prefix of this unresolved QName.- Returns:
- This QName's prefix
-
withPrefix
Return aUnresolvedQName.Qualified
object bound to specifiedprefix
.- Returns:
- a
UnresolvedQName.Qualified
object bound to specifiedprefix
- Throws:
NullPointerException
- ifnewPrefix
is null
-
UnresolvedQName.Qualified.of(String, String)
instead.