|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.discovery.resource.names.ResourceNameDiscoverImpl org.apache.commons.discovery.resource.names.DiscoverNamesInDictionary
public class DiscoverNamesInDictionary
Recover resources from a Dictionary. This covers Properties as well,
since Properties extends Hashtable extends Dictionary
.
The recovered value is expected to be either a String
or a String[]
.
Constructor Summary | |
---|---|
DiscoverNamesInDictionary()
Construct a new resource discoverer with an empty Dictionary. |
|
DiscoverNamesInDictionary(Dictionary<String,String[]> dictionary)
Construct a new resource discoverer with the given Dictionary. |
Method Summary | |
---|---|
void |
addResource(String resourceName,
String resource)
Add a resource name to a single name mapping. |
void |
addResource(String resourceName,
String[] resources)
Add a resource name to multiple names mapping. |
ResourceNameIterator |
findResourceNames(String resourceName)
Locate names of resources that are bound to resourceName . |
protected Dictionary<String,String[]> |
getDictionary()
Returns the current Dictionary for names mapping. |
void |
setDictionary(Dictionary<String,String[]> table)
Specify the Dictionary for names mapping. |
static void |
setLog(org.apache.commons.logging.Log _log)
Deprecated. This method is not thread-safe |
Methods inherited from class org.apache.commons.discovery.resource.names.ResourceNameDiscoverImpl |
---|
findResourceNames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.discovery.ResourceNameDiscover |
---|
findResourceNames |
Constructor Detail |
---|
public DiscoverNamesInDictionary()
public DiscoverNamesInDictionary(Dictionary<String,String[]> dictionary)
dictionary
- The initial DictionaryMethod Detail |
---|
@Deprecated public static void setLog(org.apache.commons.logging.Log _log)
Log
for this class.
_log
- This class Log
protected Dictionary<String,String[]> getDictionary()
public void setDictionary(Dictionary<String,String[]> table)
table
- The Dictionary for names mappingpublic void addResource(String resourceName, String resource)
resourceName
- The resource nameresource
- The target namepublic void addResource(String resourceName, String[] resources)
resourceName
- The resource nameresources
- The target namespublic ResourceNameIterator findResourceNames(String resourceName)
resourceName
.
findResourceNames
in interface ResourceNameDiscover
findResourceNames
in class ResourceNameDiscoverImpl
resourceName
- The resource name to locate
ResourceNameIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |