org.apache.axis.wsdl.toJava

Class Namespaces


public class Namespaces
extends HashMap

This class is essentially a HashMap of pairs with a few extra wizzbangs.

Constructor Summary

Namespaces(String root)
Instantiate a Namespaces object whose packages will all reside under root.

Method Summary

Object
clone()
Instantiate a clone of this Namespaces object.
String
getAsDir(String key)
Get the package name in directory format (dots replaced by slashes).
String
getCreate(String key)
Get the package name for the given namespace.
Map
getPkg2NamespacesMap()
void
mkdir(String pkg)
Make a directory for the given package under root.
Object
put(Object key, Object value)
void
putAll(Map map)
Like HashMap's putAll, this adds the given map's contents to this map.
void
setDefaultPackage(String defaultPackage)
Set a package name that overrides the namespace map
String
toDir(String pkg)
Return the given package name in directory format (dots replaced by slashes).

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.
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:

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:

getPkg2NamespacesMap

public Map getPkg2NamespacesMap()

mkdir

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

put

public Object put(Object key,
                  Object value)

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.
Parameters:
map -

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)

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:

Copyright © 2005 Apache Web Services Project. All Rights Reserved.