Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jabberwookie
Class Namespaces  view Namespaces download Namespaces.java

java.lang.Object
  extended bycom.jabberwookie.Namespaces

public class Namespaces
extends java.lang.Object

This class handles the maping of Jabber namespaces to Java classes. By default it will load a maping that understands all the classes implemented in the com.jabberwookie.ns.jabber.* heirarchy.


Field Summary
protected static java.lang.String DEFAULT_NAMESPACES
           
protected  java.util.Hashtable nsTable
           
 
Constructor Summary
Namespaces()
          Creates a new instance of Namespaces with just the default mapings.
Namespaces(java.util.Hashtable customNamespaces)
          Creates a new instance of Namespaces with the default mapings as well as any custom namespace mapings you pass.
 
Method Summary
 com.ssttr.xml.XMLElement getElement(java.lang.String namespace, java.lang.String tag)
          Returns a class that knows how to interpret the given namespace.
protected static java.lang.Class loadClass(java.lang.String className)
          Loads the given class by name.
private  java.util.Hashtable loadDefaultNamespaces()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAMESPACES

protected static final java.lang.String DEFAULT_NAMESPACES
See Also:
Constant Field Values

nsTable

protected final java.util.Hashtable nsTable
Constructor Detail

Namespaces

public Namespaces()
Creates a new instance of Namespaces with just the default mapings.


Namespaces

public Namespaces(java.util.Hashtable customNamespaces)
Creates a new instance of Namespaces with the default mapings as well as any custom namespace mapings you pass. Note: your mapings will override the defaults if the names match.

Method Detail

loadDefaultNamespaces

private java.util.Hashtable loadDefaultNamespaces()

getElement

public com.ssttr.xml.XMLElement getElement(java.lang.String namespace,
                                           java.lang.String tag)
Returns a class that knows how to interpret the given namespace.


loadClass

protected static java.lang.Class loadClass(java.lang.String className)
Loads the given class by name.