org.apache.commons.discovery.resource.classes
Class ResourceClassDiscoverImpl<T>

java.lang.Object
  extended by org.apache.commons.discovery.resource.names.ResourceNameDiscoverImpl
      extended by org.apache.commons.discovery.resource.ResourceDiscoverImpl
          extended by org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl<T>
Type Parameters:
T - The SPI type
All Implemented Interfaces:
ResourceClassDiscover<T>, ResourceDiscover, ResourceNameDiscover
Direct Known Subclasses:
DiscoverClasses

public abstract class ResourceClassDiscoverImpl<T>
extends ResourceDiscoverImpl
implements ResourceClassDiscover<T>

Default ResourceClassDiscover implementation.


Constructor Summary
ResourceClassDiscoverImpl()
          Construct a new resource discoverer.
ResourceClassDiscoverImpl(ClassLoaders classLoaders)
          Construct a new resource discoverer.
 
Method Summary
 ResourceClassIterator<T> findResourceClasses(ResourceNameIterator inputNames)
          Locate class resources that are bound to resourceNames.
abstract  ResourceClassIterator<T> findResourceClasses(String className)
          Locate class resources that are bound to className.
 ResourceNameIterator findResourceNames(ResourceNameIterator resourceNames)
          Locate names of resources that are bound to inputNames.
 ResourceNameIterator findResourceNames(String resourceName)
          Locate names of resources that are bound to resourceName.
 ResourceIterator findResources(ResourceNameIterator resourceNames)
          Locate resources that are bound to resourceNames.
 ResourceIterator findResources(String resourceName)
          Locate resources that are bound to resourceName.
 
Methods inherited from class org.apache.commons.discovery.resource.ResourceDiscoverImpl
addClassLoader, getClassLoaders, setClassLoaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceClassDiscoverImpl

public ResourceClassDiscoverImpl()
Construct a new resource discoverer.


ResourceClassDiscoverImpl

public ResourceClassDiscoverImpl(ClassLoaders classLoaders)
Construct a new resource discoverer.

Parameters:
classLoaders - The class loaders holder
Method Detail

findResourceNames

public ResourceNameIterator findResourceNames(String resourceName)
Locate names of resources that are bound to resourceName.

Specified by:
findResourceNames in interface ResourceNameDiscover
Overrides:
findResourceNames in class ResourceDiscoverImpl
Parameters:
resourceName - The resource name to locate
Returns:
A new ResourceNameIterator

findResourceNames

public ResourceNameIterator findResourceNames(ResourceNameIterator resourceNames)
Locate names of resources that are bound to inputNames.

Specified by:
findResourceNames in interface ResourceNameDiscover
Overrides:
findResourceNames in class ResourceDiscoverImpl
Parameters:
resourceNames - The resource names to locate
Returns:
A new ResourceNameIterator

findResources

public ResourceIterator findResources(String resourceName)
Locate resources that are bound to resourceName.

Specified by:
findResources in interface ResourceDiscover
Specified by:
findResources in class ResourceDiscoverImpl
Parameters:
resourceName - The resource name has to be located
Returns:
The located resources iterator

findResources

public ResourceIterator findResources(ResourceNameIterator resourceNames)
Locate resources that are bound to resourceNames.

Specified by:
findResources in interface ResourceDiscover
Overrides:
findResources in class ResourceDiscoverImpl
Parameters:
resourceNames - The resources name iterator has to be located
Returns:
The located resources iterator

findResourceClasses

public abstract ResourceClassIterator<T> findResourceClasses(String className)
Locate class resources that are bound to className.

Specified by:
findResourceClasses in interface ResourceClassDiscover<T>
Parameters:
className - The class name has to be located
Returns:
The located resources iterator

findResourceClasses

public ResourceClassIterator<T> findResourceClasses(ResourceNameIterator inputNames)
Locate class resources that are bound to resourceNames.

Specified by:
findResourceClasses in interface ResourceClassDiscover<T>
Parameters:
inputNames - The resource name iterator
Returns:
a new ResourceClassIterator over the given resource name iterator


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.