Class MultiResourceFinder
java.lang.Object
org.codehaus.commons.compiler.util.resource.ResourceFinder
org.codehaus.commons.compiler.util.resource.ListableResourceFinder
org.codehaus.commons.compiler.util.resource.MultiResourceFinder
- Direct Known Subclasses:
LazyMultiResourceFinder
A
ResourceFinder
that finds its resources through a collection of
other ResourceFinder
s.-
Field Summary
FieldsFields inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder
EMPTY_RESOURCE_FINDER
-
Constructor Summary
ConstructorsConstructorDescriptionMultiResourceFinder
(Iterable<? extends ResourceFinder> resourceFinders) MultiResourceFinder
(ResourceFinder... resourceFinders) -
Method Summary
Methods inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder
findResourceAsStream
-
Field Details
-
resourceFinders
-
-
Constructor Details
-
MultiResourceFinder
- Parameters:
resourceFinders
- The entries of the "path"
-
MultiResourceFinder
- Parameters:
resourceFinders
- The entries of the "path"
-
-
Method Details
-
findResource
Description copied from class:ResourceFinder
Finds a resource by name and return it as aResource
object.- Specified by:
findResource
in classResourceFinder
- Parameters:
resourceName
- Designates the resource; typically structured by slashes ("/") like "com/foo/pkg/Bar.class
"- Returns:
null
if the resource could not be found
-
list
@Nullable public Iterable<Resource> list(String resourceNamePrefix, boolean recurse) throws IOException - Specified by:
list
in classListableResourceFinder
- Parameters:
resourceNamePrefix
- E.g.""
or"java/lang"
- Returns:
- All resources who's name starts with the given prefix;
null
iff a location designated by the resourceNamePrefix does not exist - Throws:
IOException
-