Javolution 6.0.0 java
|
Public Member Functions | |
CharSequence | getLocalName () |
CharSequence | getNamespaceURI () |
boolean | equals (Object obj) |
String | toString () |
int | hashCode () |
char | charAt (int index) |
int | length () |
CharSequence | subSequence (int start, int end) |
QName | value () |
Static Public Member Functions | |
static QName | valueOf (CharSequence name) |
static QName | valueOf (String name) |
static QName | valueOf (CharSequence namespaceURI, CharSequence localName) |
Private Member Functions | |
QName (String namespaceURI, String localName, String toString) | |
Object | readResolve () throws ObjectStreamException |
Static Private Member Functions | |
static QName | createNoNamespace (String name) |
Private Attributes | |
transient final CharArray | _localName |
transient final CharArray | _namespaceURI |
final String | _toString |
Static Private Attributes | |
static final FastMap< CharSequence, QName > | FULL_NAME_TO_QNAME |
static final long | serialVersionUID = -6126031630693748647L |
This class represents unique identifiers for XML elements (tags) or attributes (names).
It should be noted that QName.valueOf(null, "name")
and QName.valueOf("", "name")
are distinct; the first one has no namespace associated with; whereas the second is associated to the root namespace.
QName have a textual representation (CharSequence) which is either the local name (if no namespace URI) or {namespaceURI}localName
(otherwise).
Definition at line 37 of file QName.java.
|
private |
Creates a qualified name having the specified local name and namespace reference.
namespaceURI | the URI reference or null if none. |
localName | the local name. |
toString | the string representation. |
Definition at line 68 of file QName.java.
References javolution.xml.QName._localName, javolution.xml.QName._namespaceURI, javolution.xml.QName._toString, and javolution.xml.QName.toString().
Referenced by javolution.xml.QName.createNoNamespace(), and javolution.xml.QName.valueOf().
char javolution.xml.QName.charAt | ( | int | index | ) |
Returns the character at the specified index.
index | the index of the character starting at 0 . |
IndexOutOfBoundsException | if ((index < 0) || (index >= length)) |
Definition at line 192 of file QName.java.
References javolution.xml.QName._toString.
|
staticprivate |
Definition at line 88 of file QName.java.
References javolution.xml.QName.FULL_NAME_TO_QNAME, and javolution.xml.QName.QName().
Referenced by javolution.xml.QName.valueOf().
boolean javolution.xml.QName.equals | ( | Object | obj | ) |
Instances of this class are unique; object's equality can be replaced object identity (==
).
this == obj
Definition at line 160 of file QName.java.
CharSequence javolution.xml.QName.getLocalName | ( | ) |
Returns the local part of this qualified name or the full qualified name if there is no namespace.
Definition at line 140 of file QName.java.
References javolution.xml.QName._localName.
Referenced by javolution.xml.XMLBinding.readClass(), and javolution.xml.XMLBinding.writeClass().
CharSequence javolution.xml.QName.getNamespaceURI | ( | ) |
Returns the namespace URI of this qualified name or null
if none (the local name is then the full qualified name).
null
Definition at line 150 of file QName.java.
References javolution.xml.QName._namespaceURI.
Referenced by javolution.xml.XMLBinding.readClass(), and javolution.xml.XMLBinding.writeClass().
int javolution.xml.QName.hashCode | ( | ) |
Returns the hash code for this qualified name.
Note: Returns the same hashCode as java.lang.String
(consistent with equals)
Definition at line 180 of file QName.java.
References javolution.xml.QName._toString.
int javolution.xml.QName.length | ( | ) |
Returns the length of this character sequence.
Definition at line 202 of file QName.java.
References javolution.xml.QName._toString.
|
private |
Definition at line 222 of file QName.java.
References javolution.xml.QName._toString, and javolution.xml.QName.valueOf().
CharSequence javolution.xml.QName.subSequence | ( | int | start, |
int | end | ||
) |
Returns a new character sequence that is a subsequence of this sequence.
start | the index of the first character inclusive. |
end | the index of the last character exclusive. |
start
position and ending just before the specified end
position. IndexOutOfBoundsException | if (start < 0) || (end < 0) ||
(start > end) || (end > this.length())
|
Definition at line 217 of file QName.java.
References javolution.xml.QName._toString.
String javolution.xml.QName.toString | ( | ) |
Returns the String
representation of this qualified name.
Definition at line 169 of file QName.java.
References javolution.xml.QName._toString.
Referenced by javolution.xml.QName.QName(), javolution.xml.QName.valueOf(), and javolution.xml.XMLBinding.writeClass().
QName javolution.xml.QName.value | ( | ) |
Returns the constant value held by this object.
Implements javolution.lang.Immutable< T >.
Definition at line 229 of file QName.java.
|
static |
Returns the qualified name corresponding to the specified character sequence representation (may include the "{namespaceURI}" prefix).
name | the qualified name lexical representation. |
Definition at line 82 of file QName.java.
References javolution.xml.QName.createNoNamespace(), javolution.xml.QName.FULL_NAME_TO_QNAME, javolution.xml.QName.QName(), and javolution.xml.QName.toString().
Referenced by javolution.xml.XMLBinding.readClass(), javolution.xml.QName.readResolve(), javolution.xml.XMLBinding.reset(), javolution.xml.XMLBinding.setAlias(), javolution.xml.XMLBinding.setClassAttribute(), and javolution.xml.QName.valueOf().
|
static |
Returns the qualified name corresponding to the specified namespace URI and local name.
namespaceURI | the URI reference or null if none. |
localName | the local name. |
Definition at line 122 of file QName.java.
References javolution.text.TextBuilder.append(), and javolution.xml.QName.valueOf().
|
static |
Equivalent to valueOf(CharSequence) (for J2ME compatibility).
name | the qualified name lexical representation. |
Definition at line 109 of file QName.java.
References javolution.xml.QName.createNoNamespace(), javolution.xml.QName.FULL_NAME_TO_QNAME, and javolution.xml.QName.QName().
|
private |
Holds the local name.
Definition at line 42 of file QName.java.
Referenced by javolution.xml.QName.getLocalName(), and javolution.xml.QName.QName().
|
private |
Holds the namespace URI reference or null
if none.
Definition at line 47 of file QName.java.
Referenced by javolution.xml.QName.getNamespaceURI(), and javolution.xml.QName.QName().
|
private |
Holds the string representation.
Definition at line 52 of file QName.java.
Referenced by javolution.xml.QName.charAt(), javolution.xml.QName.hashCode(), javolution.xml.QName.length(), javolution.xml.QName.QName(), javolution.xml.QName.readResolve(), javolution.xml.QName.subSequence(), and javolution.xml.QName.toString().
Holds the full name (String) to QName mapping.
Definition at line 57 of file QName.java.
Referenced by javolution.xml.QName.createNoNamespace(), and javolution.xml.QName.valueOf().
|
staticprivate |
Definition at line 226 of file QName.java.