Class NamespaceCache

java.lang.Object
org.dom4j.tree.NamespaceCache

public class NamespaceCache extends Object

NamespaceCache caches instances of DefaultNamespace for reuse both across documents and within documents.

Version:
$Revision: 1.15 $
  • Field Details

  • Constructor Details

    • NamespaceCache

      public NamespaceCache()
  • Method Details

    • get

      public Namespace get(String prefix, String uri)
      DOCUMENT ME!
      Parameters:
      prefix - DOCUMENT ME!
      uri - DOCUMENT ME!
      Returns:
      the namespace for the given prefix and uri
    • get

      public Namespace get(String uri)
      DOCUMENT ME!
      Parameters:
      uri - DOCUMENT ME!
      Returns:
      the name model for the given name and namepsace
    • getURICache

      protected Map<String,WeakReference<Namespace>> getURICache(String uri)
      DOCUMENT ME!
      Parameters:
      uri - DOCUMENT ME!
      Returns:
      the cache for the given namespace URI. If one does not currently exist it is created.
    • createNamespace

      protected Namespace createNamespace(String prefix, String uri)
      A factory method to create Namespaceinstance
      Parameters:
      prefix - DOCUMENT ME!
      uri - DOCUMENT ME!
      Returns:
      a newly created Namespaceinstance.