Class UnresolvedQName
- java.lang.Object
-
- org.opendaylight.yangtools.yang.common.AbstractQName
-
- org.opendaylight.yangtools.yang.common.UnresolvedQName
-
- All Implemented Interfaces:
Serializable
,Identifier
,Immutable
,MutationBehaviour<Immutable>
,WritableObject
- Direct Known Subclasses:
UnresolvedQName.Qualified
,UnresolvedQName.Unqualified
@NonNullByDefault public abstract class UnresolvedQName extends AbstractQName
AQName
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnresolvedQName.Qualified
An unresolved, qualifiedQName
.static class
UnresolvedQName.Unqualified
An unresolved, unqualifiedQName
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @Nullable String
getPrefix()
Return the prefix of this unresolved QName.abstract UnresolvedQName
intern()
Return an interned reference to an equivalent object.static UnresolvedQName.Qualified
qualified(String prefix, String localName)
Create a new qualified unresolved QName.static @Nullable UnresolvedQName.Unqualified
tryLocalName(String localName)
Try to create a new unqualified QName.static UnresolvedQName.Unqualified
unqualified(String localName)
Create a new unqualified unresolved 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
-
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 Detail
-
qualified
public static UnresolvedQName.Qualified qualified(String prefix, String localName)
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
public static UnresolvedQName.Unqualified unqualified(String localName)
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
public static @Nullable UnresolvedQName.Unqualified tryLocalName(String localName)
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
public abstract UnresolvedQName 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
public abstract @Nullable String getPrefix()
Return the prefix of this unresolved QName.- Returns:
- This QName's prefix
-
withPrefix
public abstract UnresolvedQName.Qualified withPrefix(String newPrefix)
Return aUnresolvedQName.Qualified
object bound to specifiedprefix
.- Returns:
- a
UnresolvedQName.Qualified
object bound to specifiedprefix
- Throws:
NullPointerException
- ifnewPrefix
is null
-
-