Top Description Constructors Methods
org.codehaus.commons.compiler.util.resource

public Class PathResourceFinder

extends LazyMultiResourceFinder
Class Inheritance
Imports
java.io.File, .IOException, java.util.Arrays, .Iterator, java.util.zip.ZipFile, org.codehaus.commons.compiler.util.StringUtil, org.codehaus.commons.compiler.util.iterator.TransformingIterator

A org.codehaus.commons.compiler.util.resource.ResourceFinder that finds its resources along a "path" consisting of JAR file names, ZIP file names, and directory names.
See Also
org.codehaus.commons.compiler.util.resource.ZipFileResourceFinder, org.codehaus.commons.compiler.util.resource.DirectoryResourceFinder

Constructor Summary

AccessConstructor and Description
public
PathResourceFinder(final File[]
The entries of the "path"
entries
)

public
PathResourceFinder(Iterator<ResourceFinder>
The entries of the "path"
entries
)

public
PathResourceFinder(String
A java-like path, i.e. a "path separator"-separated list of entries
path
)

Method Summary

Modifier and TypeMethod and Description
private static Iterator<ResourceFinder>
createIterator(final Iterator<File> entries)

private static ResourceFinder

Returns:

a valid ResourceFinder
createResourceFinder
(final File entry)

A factory method that creates a Java classpath-style ResourceFinder as follows:

entryReturned ResourceFinder "*.jar" fileZipFileResourceFinder "*.zip" fileZipFileResourceFinder directoryDirectoryResourceFinder any otherA ResourceFinder that never finds a resource

Constructor Detail

PathResourceFinderback to summary
public PathResourceFinder(final File[] entries)
Parameters
entries:File[]

The entries of the "path"

PathResourceFinderback to summary
public PathResourceFinder(Iterator<ResourceFinder> entries)
Parameters
entries:Iterator<ResourceFinder>

The entries of the "path"

PathResourceFinderback to summary
public PathResourceFinder(String path)
Parameters
path:String

A java-like path, i.e. a "path separator"-separated list of entries

Method Detail

createIteratorback to summary
private static Iterator<ResourceFinder> createIterator(final Iterator<File> entries)
createResourceFinderback to summary
private static ResourceFinder createResourceFinder(final File entry)

A factory method that creates a Java classpath-style ResourceFinder as follows:

entryReturned ResourceFinder
"*.jar" fileZipFileResourceFinder
"*.zip" fileZipFileResourceFinder
directoryDirectoryResourceFinder
any otherA ResourceFinder that never finds a resource
Returns:ResourceFinder

a valid ResourceFinder