Class Namespaces

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
org.apache.axis.wsdl.toJava.Namespaces
All Implemented Interfaces:
Serializable, Cloneable, Map

public class Namespaces extends HashMap
This class is essentially a HashMap of <namespace, package name> pairs with a few extra wizzbangs.
See Also:
  • Constructor Details

    • Namespaces

      public Namespaces(String root)
      Instantiate a Namespaces object whose packages will all reside under root.
      Parameters:
      root -
  • Method Details

    • clone

      public Object clone()
      Instantiate a clone of this Namespaces object.
      Overrides:
      clone in class HashMap
      Returns:
    • getCreate

      public String getCreate(String key)
      Get the package name for the given namespace. If there is no entry in the HashMap for this namespace, create one.
      Parameters:
      key -
      Returns:
    • getAsDir

      public String getAsDir(String key)
      Get the package name in directory format (dots replaced by slashes). If the package name doesn't exist in the HashMap, return "".
      Parameters:
      key -
      Returns:
    • toDir

      public String toDir(String pkg)
      Return the given package name in directory format (dots replaced by slashes). If pkg is null, "" is returned.
      Parameters:
      pkg -
      Returns:
    • putAll

      public void putAll(Map map)
      Like HashMap's putAll, this adds the given map's contents to this map. But it also makes sure the value strings are javified.
      Specified by:
      putAll in interface Map
      Overrides:
      putAll in class HashMap
      Parameters:
      map -
    • mkdir

      public void mkdir(String pkg)
      Make a directory for the given package under root.
      Parameters:
      pkg -
    • setDefaultPackage

      public void setDefaultPackage(String defaultPackage)
      Set a package name that overrides the namespace map
      Parameters:
      defaultPackage - a java package name (e.g. com.foo)
    • put

      public Object put(Object key, Object value)
      Specified by:
      put in interface Map
      Overrides:
      put in class HashMap
    • getPkg2NamespacesMap

      public Map getPkg2NamespacesMap()