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
Objectclone()
Instantiate a clone of this Namespaces object.
StringgetAsDir(String key)
Get the package name in directory format (dots replaced by slashes).
StringgetCreate(String key)
Get the package name for the given namespace.
MapgetPkg2NamespacesMap()
voidmkdir(String pkg)
Make a directory for the given package under root.
Objectput(Object key, Object value)
voidputAll(Map map)
Like HashMap's putAll, this adds the given map's contents to this map.
voidsetDefaultPackage(String defaultPackage)
Set a package name that overrides the namespace map
StringtoDir(String pkg)
Return the given package name in directory format (dots replaced by slashes).

Constructor Detail

Namespaces

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

Parameters: root

Method Detail

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 B) 2005 Apache Web Services Project. All Rights Reserved.