public final class FilesScanner extends AbstractResourceFinderAdapter
ResourceProcessor
.Modifier and Type | Field and Description |
---|---|
private CompositeResourceFinder |
compositeResourceFinder |
private java.io.File[] |
files |
private boolean |
recursive |
Constructor and Description |
---|
FilesScanner(java.lang.String[] fileNames,
boolean recursive)
Scan from a set of packages.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Default implementation of
#close() which does nothing. |
boolean |
hasNext() |
private void |
init() |
java.lang.String |
next() |
java.io.InputStream |
open()
Open current resource.
|
private void |
processFile(java.io.File f) |
void |
reset()
Reset the
ResourceFinder instance. |
remove
private final java.io.File[] files
private final boolean recursive
private CompositeResourceFinder compositeResourceFinder
public FilesScanner(java.lang.String[] fileNames, boolean recursive)
fileNames
- an array of package names.recursive
- flag indicating whether sub-directories of any directories in the list of
files should be included in the scanning (true
) or not (false
).private void processFile(java.io.File f)
public boolean hasNext()
public java.lang.String next()
public java.io.InputStream open()
ResourceFinder
public void close()
AbstractResourceFinderAdapter
#close()
which does nothing.close
in interface java.lang.AutoCloseable
close
in interface ResourceFinder
close
in class AbstractResourceFinderAdapter
public void reset()
ResourceFinder
ResourceFinder
instance.
Upon calling this method the implementing class MUST reset its internal state to the initial state.private void init()