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
AResourceFinder
that 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 ResourceFinder
createResourceFinder(java.io.File entry)
A factory method that creates a Java classpath-style ResourceFinder as follows:entry
ReturnedResourceFinder
"*.jar" fileZipFileResourceFinder
"*.zip" fileZipFileResourceFinder
directoryDirectoryResourceFinder
any otherAResourceFinder
that 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:entry
Returned ResourceFinder
"*.jar" file ZipFileResourceFinder
"*.zip" file ZipFileResourceFinder
directory DirectoryResourceFinder
any other A ResourceFinder
that never finds a resource- Returns:
- a valid
ResourceFinder
-
-