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 StringReturn the prefix of this unresolved QName.abstract UnresolvedQNameintern()Return an interned reference to an equivalent object.static @Nullable UnresolvedQName.UnqualifiedtryLocalName(String localName) Try to create a new unqualified QName.abstract UnresolvedQName.QualifiedwithPrefix(String newPrefix) Return aUnresolvedQName.Qualifiedobject bound to specifiedprefix.Methods inherited from class org.opendaylight.yangtools.yang.common.AbstractQName
bindTo, equals, getLocalName, hashCode, toString, unbindMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:AbstractQNameReturn an interned reference to an equivalent object.- Specified by:
internin 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.Qualifiedobject bound to specifiedprefix.- Returns:
- a
UnresolvedQName.Qualifiedobject bound to specifiedprefix - Throws:
NullPointerException- ifnewPrefixis null
-