Class NameDiscoverers
java.lang.Object
org.apache.commons.discovery.resource.names.ResourceNameDiscoverImpl
org.apache.commons.discovery.resource.names.NameDiscoverers
- All Implemented Interfaces:
ResourceNameDiscover
Holder for multiple ResourceNameDiscover instances.
The result is the union of the results from each
(not a chained sequence, where results feed the next in line.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResourceNameDiscover(ResourceNameDiscover discover) Specify an discover to be used in searching.findResourceNames(String resourceName) Locate names of resources that are bound toresourceName.protected ResourceNameDiscovergetResourceNameDiscover(int idx) Retrieve the discover positioned at the given index.static voidsetLog(org.apache.commons.logging.Log _log) Deprecated.This method is not thread-safeprotected intsize()Returns the current size of set discovers.Methods inherited from class ResourceNameDiscoverImpl
findResourceNamesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceNameDiscover
findResourceNames
-
Constructor Details
-
NameDiscoverers
public NameDiscoverers()Construct a new resource name discoverer
-
-
Method Details
-
setLog
Deprecated.This method is not thread-safeSets theLogfor this class.- Parameters:
_log- This classLog
-
addResourceNameDiscover
Specify an discover to be used in searching. The order of discover determines the order of the result. It is recommended to add the most specific discover first.- Parameters:
discover- The discover to be added
-
getResourceNameDiscover
Retrieve the discover positioned at the given index.- Parameters:
idx- The discover index position client is requiring- Returns:
- The discover positioned at the input index
-
size
Returns the current size of set discovers.- Returns:
- The current size of set discovers
-
findResourceNames
Locate names of resources that are bound toresourceName.- Specified by:
findResourceNamesin interfaceResourceNameDiscover- Specified by:
findResourceNamesin classResourceNameDiscoverImpl- Parameters:
resourceName- The resource name to locate- Returns:
- A new
ResourceNameIterator
-