Package org.apache.axis.wsdl.toJava
Class Namespaces
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap
-
- org.apache.axis.wsdl.toJava.Namespaces
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map
public class Namespaces extends java.util.HashMap
This class is essentially a HashMap ofpairs with a few extra wizzbangs. - See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Namespaces(java.lang.String root)
Instantiate a Namespaces object whose packages will all reside under root.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Instantiate a clone of this Namespaces object.java.lang.String
getAsDir(java.lang.String key)
Get the package name in directory format (dots replaced by slashes).java.lang.String
getCreate(java.lang.String key)
Get the package name for the given namespace.java.util.Map
getPkg2NamespacesMap()
void
mkdir(java.lang.String pkg)
Make a directory for the given package under root.java.lang.Object
put(java.lang.Object key, java.lang.Object value)
void
putAll(java.util.Map map)
Like HashMap's putAll, this adds the given map's contents to this map.void
setDefaultPackage(java.lang.String defaultPackage)
Set a package name that overrides the namespace mapjava.lang.String
toDir(java.lang.String pkg)
Return the given package name in directory format (dots replaced by slashes).-
Methods inherited from class java.util.HashMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
Instantiate a clone of this Namespaces object.- Overrides:
clone
in classjava.util.HashMap
- Returns:
-
getCreate
public java.lang.String getCreate(java.lang.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 java.lang.String getAsDir(java.lang.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 java.lang.String toDir(java.lang.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(java.util.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 interfacejava.util.Map
- Overrides:
putAll
in classjava.util.HashMap
- Parameters:
map
-
-
mkdir
public void mkdir(java.lang.String pkg)
Make a directory for the given package under root.- Parameters:
pkg
-
-
setDefaultPackage
public void setDefaultPackage(java.lang.String defaultPackage)
Set a package name that overrides the namespace map- Parameters:
defaultPackage
- a java package name (e.g. com.foo)
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map
- Overrides:
put
in classjava.util.HashMap
-
getPkg2NamespacesMap
public java.util.Map getPkg2NamespacesMap()
-
-