FileScanner
, ResourceFactory
, SelectorScanner
public class DependScanner extends DirectoryScanner
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEFAULT_ANALYZER_CLASS |
The name of the analyzer to use by default.
|
basedir, DEFAULTEXCLUDES, dirsDeselected, dirsExcluded, dirsIncluded, dirsNotIncluded, DOES_NOT_EXIST_POSTFIX, errorOnMissingDir, everythingIncluded, excludes, filesDeselected, filesExcluded, filesIncluded, filesNotIncluded, haveSlowResults, includes, isCaseSensitive, MAX_LEVELS_OF_SYMLINKS, selectors
Constructor | Description |
---|---|
DependScanner(DirectoryScanner parentScanner) |
Create a DependScanner, using the given scanner to provide the basic
set of files from which class files come.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addBasedir(java.io.File baseDir) |
|
void |
addDefaultExcludes() |
Add default exclusions to the current exclusions set.
|
java.lang.String[] |
getExcludedDirectories() |
Return the names of the directories which matched at least one of the
include patterns and at least one of the exclude patterns.
|
java.lang.String[] |
getExcludedFiles() |
Return the names of the files which matched at least one of the
include patterns and at least one of the exclude patterns.
|
java.lang.String[] |
getIncludedDirectories() |
Return the names of the directories which matched at least one of the
include patterns and none of the exclude patterns.
|
int |
getIncludedDirsCount() |
Return the count of included directories.
|
java.lang.String[] |
getIncludedFiles() |
Get the names of the class files on which baseClass depends.
|
int |
getIncludedFilesCount() |
Return the count of included files.
|
java.lang.String[] |
getNotIncludedDirectories() |
Return the names of the directories which matched none of the include
patterns.
|
java.lang.String[] |
getNotIncludedFiles() |
Return the names of the files which matched none of the include
patterns.
|
void |
scan() |
Scans the base directory for files on which baseClass depends.
|
void |
setCaseSensitive(boolean isCaseSensitive) |
Set whether or not include and exclude patterns are matched
in a case sensitive way.
|
void |
setExcludes(java.lang.String[] excludes) |
Set the list of exclude patterns to use.
|
void |
setIncludes(java.lang.String[] includes) |
Set the list of include patterns to use.
|
void |
setRootClasses(java.util.Vector<java.lang.String> rootClasses) |
Sets the root classes to be used to drive the scan.
|
addDefaultExclude, addExcludes, clearResults, couldHoldIncluded, getBasedir, getDefaultExcludes, getDeselectedDirectories, getDeselectedFiles, getNotFollowedSymlinks, getResource, isCaseSensitive, isEverythingIncluded, isExcluded, isFollowSymlinks, isIncluded, isSelected, match, match, matchPath, matchPath, matchPatternStart, matchPatternStart, removeDefaultExclude, resetDefaultExcludes, scandir, setBasedir, setBasedir, setErrorOnMissingDir, setFollowSymlinks, setMaxLevelsOfSymlinks, setSelectors, slowScan
public static final java.lang.String DEFAULT_ANALYZER_CLASS
public DependScanner(DirectoryScanner parentScanner)
parentScanner
- the DirectoryScanner which returns the files from
which class files must come.public void setRootClasses(java.util.Vector<java.lang.String> rootClasses)
rootClasses
- the rootClasses to be used for this scan.public java.lang.String[] getIncludedFiles()
getIncludedFiles
in interface FileScanner
getIncludedFiles
in class DirectoryScanner
public int getIncludedFilesCount()
getIncludedFilesCount
in class DirectoryScanner
int
.public void scan() throws java.lang.IllegalStateException
scan
in interface FileScanner
scan
in class DirectoryScanner
java.lang.IllegalStateException
- when basedir was set incorrectly.public void addDefaultExcludes()
DirectoryScanner
addDefaultExcludes
in interface FileScanner
addDefaultExcludes
in class DirectoryScanner
DirectoryScanner.addDefaultExcludes()
public java.lang.String[] getExcludedDirectories()
DirectoryScanner
getExcludedDirectories
in interface FileScanner
getExcludedDirectories
in class DirectoryScanner
.
public java.lang.String[] getExcludedFiles()
DirectoryScanner
getExcludedFiles
in interface FileScanner
getExcludedFiles
in class DirectoryScanner
.
public java.lang.String[] getIncludedDirectories()
DirectoryScanner
getIncludedDirectories
in interface FileScanner
getIncludedDirectories
in class DirectoryScanner
.
public int getIncludedDirsCount()
DirectoryScanner
getIncludedDirsCount
in class DirectoryScanner
int
..
public java.lang.String[] getNotIncludedDirectories()
DirectoryScanner
getNotIncludedDirectories
in interface FileScanner
getNotIncludedDirectories
in class DirectoryScanner
.
public java.lang.String[] getNotIncludedFiles()
DirectoryScanner
getNotIncludedFiles
in interface FileScanner
getNotIncludedFiles
in class DirectoryScanner
.
public void setExcludes(java.lang.String[] excludes)
DirectoryScanner
File.separatorChar
, so the separator used
need not match File.separatorChar
.
When a pattern ends with a '/' or '\', "**" is appended.
setExcludes
in interface FileScanner
setExcludes
in class DirectoryScanner
excludes
- A list of exclude patterns.
May be null
, indicating that no files
should be excluded. If a non-null
list is
given, all elements must be non-null
..
public void setIncludes(java.lang.String[] includes)
DirectoryScanner
File.separatorChar
, so the separator used
need not match File.separatorChar
.
When a pattern ends with a '/' or '\', "**" is appended.
setIncludes
in interface FileScanner
setIncludes
in class DirectoryScanner
includes
- A list of include patterns.
May be null
, indicating that all files
should be included. If a non-null
list is given, all elements must be
non-null
..
public void setCaseSensitive(boolean isCaseSensitive)
DirectoryScanner
setCaseSensitive
in interface FileScanner
setCaseSensitive
in class DirectoryScanner
isCaseSensitive
- whether or not the file system should be
regarded as a case sensitive one..
public void addBasedir(java.io.File baseDir)