public class Namespaces extends HashMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry| Constructor and Description |
|---|
Namespaces(String root)
Instantiate a Namespaces object whose packages will all reside under root.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, valuesequals, hashCode, toStringpublic Namespaces(String root)
root - public Object clone()
public String getCreate(String key)
key - public String getAsDir(String key)
key - public String toDir(String pkg)
pkg - public void putAll(Map map)
public void mkdir(String pkg)
pkg - public void setDefaultPackage(String defaultPackage)
defaultPackage - a java package name (e.g. com.foo)public Map getPkg2NamespacesMap()
Copyright © The Apache Software Foundation. All Rights Reserved.