com.sun.xml.bind.v2.runtime

Class Name

public final class Name extends Object implements Comparable<Name>

The internal representation of an XML name.

This class keeps indicies for URI and local name for enabling faster processing.

Names are ordered lexicographically (nsUri first, local name next.) This is the same order required by canonical XML.

Field Summary
booleanisAttribute
Specifies if the Name is associated with an EII or AII
StringlocalName
Local name. interned.
shortlocalNameIndex
StringnsUri
Namespace URI. interned.
shortnsUriIndex
Index -1 is reserved for representing the empty namespace URI of attributes.
shortqNameIndex
Index of the Name for an EII or AII
Constructor Summary
Name(int qNameIndex, int nsUriIndex, String nsUri, int localIndex, String localName, boolean isAttribute)
Method Summary
intcompareTo(Name that)
booleanequals(String nsUri, String localName)
QNametoQName()
Creates a QName from this.
StringtoString()

Field Detail

isAttribute

public final boolean isAttribute
Specifies if the Name is associated with an EII or AII

localName

public final String localName
Local name. interned.

localNameIndex

public final short localNameIndex

nsUri

public final String nsUri
Namespace URI. interned.

nsUriIndex

public final short nsUriIndex
Index -1 is reserved for representing the empty namespace URI of attributes.

qNameIndex

public final short qNameIndex
Index of the Name for an EII or AII

Constructor Detail

Name

Name(int qNameIndex, int nsUriIndex, String nsUri, int localIndex, String localName, boolean isAttribute)

Method Detail

compareTo

public int compareTo(Name that)

equals

public boolean equals(String nsUri, String localName)

toQName

public QName toQName()
Creates a QName from this.

toString

public String toString()