public class QNameCache
extends java.lang.Object
QNameCache
caches instances of QName
for reuse
both across documents and within documents.
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<Namespace,java.util.Map<java.lang.String,QName>> |
namespaceCache
Cache of
Map instances indexed by namespace which contain caches
of QName for each name |
protected java.util.Map<java.lang.String,QName> |
noNamespaceCache
Cache of
QName instances with no namespace |
Constructor and Description |
---|
QNameCache() |
QNameCache(DocumentFactory documentFactory) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,QName> |
createMap()
A factory method
|
protected QName |
createQName(java.lang.String name)
Factory method to create a new QName object which can be overloaded to
create derived QName instances
|
protected QName |
createQName(java.lang.String name,
Namespace namespace)
Factory method to create a new QName object which can be overloaded to
create derived QName instances
|
protected QName |
createQName(java.lang.String name,
Namespace namespace,
java.lang.String qualifiedName)
Factory method to create a new QName object which can be overloaded to
create derived QName instances
|
QName |
get(java.lang.String name)
DOCUMENT ME!
|
QName |
get(java.lang.String name,
Namespace namespace)
DOCUMENT ME!
|
QName |
get(java.lang.String localName,
Namespace namespace,
java.lang.String qName)
DOCUMENT ME!
|
QName |
get(java.lang.String qualifiedName,
java.lang.String uri) |
protected java.util.Map<java.lang.String,QName> |
getNamespaceCache(Namespace namespace)
DOCUMENT ME!
|
java.util.List<QName> |
getQNames()
Returns a list of all the QName instances currently used
|
QName |
intern(QName qname)
DOCUMENT ME!
|
protected java.util.Map<java.lang.String,QName> noNamespaceCache
QName
instances with no namespacepublic QNameCache()
public QNameCache(DocumentFactory documentFactory)
public java.util.List<QName> getQNames()
public QName get(java.lang.String name)
name
- DOCUMENT ME!public QName get(java.lang.String name, Namespace namespace)
name
- DOCUMENT ME!namespace
- DOCUMENT ME!public QName get(java.lang.String localName, Namespace namespace, java.lang.String qName)
localName
- DOCUMENT ME!namespace
- DOCUMENT ME!qName
- DOCUMENT ME!public QName get(java.lang.String qualifiedName, java.lang.String uri)
public QName intern(QName qname)
qname
- DOCUMENT ME!protected java.util.Map<java.lang.String,QName> getNamespaceCache(Namespace namespace)
namespace
- DOCUMENT ME!protected java.util.Map<java.lang.String,QName> createMap()
Map
instance.protected QName createQName(java.lang.String name)
name
- DOCUMENT ME!protected QName createQName(java.lang.String name, Namespace namespace)
name
- DOCUMENT ME!namespace
- DOCUMENT ME!protected QName createQName(java.lang.String name, Namespace namespace, java.lang.String qualifiedName)
name
- DOCUMENT ME!namespace
- DOCUMENT ME!qualifiedName
- DOCUMENT ME!