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 @Nullable UnresolvedQName.Unqualified
tryLocalName
(String localName) Try to create a new unqualified QName.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, unbind
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
-
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
-