Class PathResourceFinder
- java.lang.Object
-
- org.codehaus.commons.compiler.util.resource.ResourceFinder
-
- org.codehaus.commons.compiler.util.resource.ListableResourceFinder
-
- org.codehaus.commons.compiler.util.resource.MultiResourceFinder
-
- org.codehaus.commons.compiler.util.resource.LazyMultiResourceFinder
-
- org.codehaus.commons.compiler.util.resource.PathResourceFinder
-
public class PathResourceFinder extends LazyMultiResourceFinder
AResourceFinderthat finds its resources along a "path" consisting of JAR file names, ZIP file names, and directory names.- See Also:
ZipFileResourceFinder,DirectoryResourceFinder
-
-
Field Summary
-
Fields inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder
EMPTY_RESOURCE_FINDER
-
-
Constructor Summary
Constructors Constructor Description PathResourceFinder(java.io.File[] entries)PathResourceFinder(java.lang.String path)PathResourceFinder(java.util.Iterator<ResourceFinder> entries)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.Iterator<ResourceFinder>createIterator(java.util.Iterator<java.io.File> entries)private static ResourceFindercreateResourceFinder(java.io.File entry)A factory method that creates a Java classpath-style ResourceFinder as follows:entryReturnedResourceFinder"*.jar" fileZipFileResourceFinder"*.zip" fileZipFileResourceFinderdirectoryDirectoryResourceFinderany otherAResourceFinderthat never finds a resource-
Methods inherited from class org.codehaus.commons.compiler.util.resource.MultiResourceFinder
findResource, list
-
Methods inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder
findResourceAsStream
-
-
-
-
Constructor Detail
-
PathResourceFinder
public PathResourceFinder(java.io.File[] entries)
- Parameters:
entries- The entries of the "path"
-
PathResourceFinder
public PathResourceFinder(java.util.Iterator<ResourceFinder> entries)
- Parameters:
entries- The entries of the "path"
-
PathResourceFinder
public PathResourceFinder(java.lang.String path)
- Parameters:
path- A java-like path, i.e. a "path separator"-separated list of entries
-
-
Method Detail
-
createIterator
private static java.util.Iterator<ResourceFinder> createIterator(java.util.Iterator<java.io.File> entries)
-
createResourceFinder
private static ResourceFinder createResourceFinder(java.io.File entry)
A factory method that creates a Java classpath-style ResourceFinder as follows:entryReturned ResourceFinder"*.jar" file ZipFileResourceFinder"*.zip" file ZipFileResourceFinderdirectory DirectoryResourceFinderany other A ResourceFinderthat never finds a resource- Returns:
- a valid
ResourceFinder
-
-