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:
  1. UnresolvedQName.Unqualified, which holds only a local name available through AbstractQName.getLocalName().
  2. UnresolvedQName.Qualified, which also holds a string prefix available via UnresolvedQName.Qualified.getPrefix().
See Also:
  • Method Details

    • 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 class AbstractQName
      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 a UnresolvedQName.Qualified object bound to specified prefix.
      Returns:
      a UnresolvedQName.Qualified object bound to specified prefix
      Throws:
      NullPointerException - if newPrefix is null