public class NamespaceCache
extends java.lang.Object
NamespaceCache
caches instances of
DefaultNamespace
for reuse both across documents and within
documents.
Modifier and Type | Field | Description |
---|---|---|
protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.ref.WeakReference<Namespace>>> |
cache |
Cache of
Map instances indexed by URI which contain caches of
Namespace for each prefix |
protected static java.util.Map<java.lang.String,java.lang.ref.WeakReference<Namespace>> |
noPrefixCache |
Cache of
Namespace instances indexed by URI for default
namespaces with no prefixes |
Constructor | Description |
---|---|
NamespaceCache() |
Modifier and Type | Method | Description |
---|---|---|
protected Namespace |
createNamespace(java.lang.String prefix,
java.lang.String uri) |
A factory method to create
Namespace instance |
Namespace |
get(java.lang.String uri) |
DOCUMENT ME!
|
Namespace |
get(java.lang.String prefix,
java.lang.String uri) |
DOCUMENT ME!
|
protected java.util.Map<java.lang.String,java.lang.ref.WeakReference<Namespace>> |
getURICache(java.lang.String uri) |
DOCUMENT ME!
|
protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.ref.WeakReference<Namespace>>> cache
Map
instances indexed by URI which contain caches of
Namespace
for each prefixpublic Namespace get(java.lang.String prefix, java.lang.String uri)
prefix
- DOCUMENT ME!uri
- DOCUMENT ME!public Namespace get(java.lang.String uri)
uri
- DOCUMENT ME!protected java.util.Map<java.lang.String,java.lang.ref.WeakReference<Namespace>> getURICache(java.lang.String uri)
uri
- DOCUMENT ME!