Package org.apache.axis.wsdl.fromJava
Class Namespaces
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.apache.axis.wsdl.fromJava.Namespaces
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
Description: A HashMap of packageNames and namespaces with some helper methods
- Author:
- rkumar@borland.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the namespaace for the given package If there is no entry in the HashMap for this namespace, create one.Get the namespaace for the given package If there is no entry in the HashMap for this namespace, create one.getCreatePrefix
(String namespace) Get the prefix for the given namespace.Get the list of namespaces currently registeredstatic String
getPackage
(String namespace) Reverse the process.static String
makeNamespace
(String clsName) Make namespace from a fully qualified class name use the default protocol for the namespacestatic String
makeNamespace
(String clsName, String protocol) Make namespace from a fully qualified class name and the given protocoladds an entry to the packagename/namespace HashMap.void
adds an entry to the packagename/namespace HashMap for each of the entry in the map.void
putAllPrefix
(Map map) adds an entry to the namespace / prefix HashMap for each of the entry in the map.void
put the gine namespace / prefix into the appropriate HashMapMethods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
Namespaces
public Namespaces()Constructor Namespaces
-
-
Method Details
-
getCreate
Get the namespaace for the given package If there is no entry in the HashMap for this namespace, create one.- Parameters:
key
- String representing packagename- Returns:
- the namespace either created or existing
-
getCreate
Get the namespaace for the given package If there is no entry in the HashMap for this namespace, create one.- Parameters:
key
- String representing packagenameprefix
- the prefix to use for the generated namespace- Returns:
- the namespace either created or existing
-
put
adds an entry to the packagename/namespace HashMap. In addition, also makes an entry in the auxillary namespace/prefix HashMap if an entry doesn't already exists- Parameters:
key
- packageName Stringvalue
- namespace valueprefix
- the prefix to use for the given namespace- Returns:
- old value for the specified key
-
putAll
adds an entry to the packagename/namespace HashMap for each of the entry in the map. In addition, also add an entries in the auxillary namespace/prefix HashMap -
getCreatePrefix
Get the prefix for the given namespace. If one exists, create one- Parameters:
namespace
- namespace- Returns:
- prefix String
-
putPrefix
put the gine namespace / prefix into the appropriate HashMap- Parameters:
namespace
-prefix
-
-
putAllPrefix
adds an entry to the namespace / prefix HashMap for each of the entry in the map.- Parameters:
map
- packageName/namespace map
-
makeNamespace
Make namespace from a fully qualified class name use the default protocol for the namespace- Parameters:
clsName
- fully qualified class name- Returns:
- namespace namespace String
-
makeNamespace
Make namespace from a fully qualified class name and the given protocol- Parameters:
clsName
- fully qualified class nameprotocol
- protocol String- Returns:
- namespace namespace String
-
getPackage
Reverse the process. Get the package name from the namespace.- Parameters:
namespace
-- Returns:
-
getNamespaces
Get the list of namespaces currently registered- Returns:
- iterator
-