Class DependScanner
java.lang.Object
org.apache.tools.ant.DirectoryScanner
org.apache.tools.ant.types.optional.depend.DependScanner
- All Implemented Interfaces:
- FileScanner,- ResourceFactory,- SelectorScanner
DirectoryScanner for finding class dependencies.
- 
Field SummaryFieldsFields inherited from class org.apache.tools.ant.DirectoryScannerbasedir, 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 SummaryConstructorsConstructorDescriptionDependScanner(DirectoryScanner parentScanner) Create a DependScanner, using the given scanner to provide the basic set of files from which class files come.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddBasedir(File baseDir) voidAdd default exclusions to the current exclusions set.String[]Return the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.String[]Return the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.String[]Return the names of the directories which matched at least one of the include patterns and none of the exclude patterns.intReturn the count of included directories.String[]Get the names of the class files on which baseClass depends.intReturn the count of included files.String[]Return the names of the directories which matched none of the include patterns.String[]Return the names of the files which matched none of the include patterns.voidscan()Scans the base directory for files on which baseClass depends.voidsetCaseSensitive(boolean isCaseSensitive) Set whether or not include and exclude patterns are matched in a case sensitive way.voidsetExcludes(String[] excludes) Set the list of exclude patterns to use.voidsetIncludes(String[] includes) Set the list of include patterns to use.voidsetRootClasses(Vector<String> rootClasses) Sets the root classes to be used to drive the scan.Methods inherited from class org.apache.tools.ant.DirectoryScanneraddDefaultExclude, 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
- 
Field Details- 
DEFAULT_ANALYZER_CLASSThe name of the analyzer to use by default.- See Also:
 
 
- 
- 
Constructor Details- 
DependScannerCreate a DependScanner, using the given scanner to provide the basic set of files from which class files come.- Parameters:
- parentScanner- the DirectoryScanner which returns the files from which class files must come.
 
 
- 
- 
Method Details- 
setRootClasses
- 
getIncludedFilesGet the names of the class files on which baseClass depends.- Specified by:
- getIncludedFilesin interface- FileScanner
- Overrides:
- getIncludedFilesin class- DirectoryScanner
- Returns:
- the names of the files.
 
- 
getIncludedFilesCountpublic int getIncludedFilesCount()Return the count of included files..- Overrides:
- getIncludedFilesCountin class- DirectoryScanner
- Returns:
- int.
 
- 
scanScans the base directory for files on which baseClass depends.- Specified by:
- scanin interface- FileScanner
- Overrides:
- scanin class- DirectoryScanner
- Throws:
- IllegalStateException- when basedir was set incorrectly.
 
- 
addDefaultExcludespublic void addDefaultExcludes()Description copied from class:DirectoryScannerAdd default exclusions to the current exclusions set.- Specified by:
- addDefaultExcludesin interface- FileScanner
- Overrides:
- addDefaultExcludesin class- DirectoryScanner
- See Also:
 
- 
getExcludedDirectoriesDescription copied from class:DirectoryScannerReturn the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.- Specified by:
- getExcludedDirectoriesin interface- FileScanner
- Overrides:
- getExcludedDirectoriesin class- DirectoryScanner
- Returns:
- the names of the directories which matched at least one of the include patterns and at least one of the exclude patterns.
- See Also:
 
- 
getExcludedFilesDescription copied from class:DirectoryScannerReturn the names of the files which matched at least one of the include patterns and at least one of the exclude patterns. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.- Specified by:
- getExcludedFilesin interface- FileScanner
- Overrides:
- getExcludedFilesin class- DirectoryScanner
- Returns:
- the names of the files which matched at least one of the include patterns and at least one of the exclude patterns.
- See Also:
 
- 
getIncludedDirectoriesDescription copied from class:DirectoryScannerReturn the names of the directories which matched at least one of the include patterns and none of the exclude patterns. The names are relative to the base directory.- Specified by:
- getIncludedDirectoriesin interface- FileScanner
- Overrides:
- getIncludedDirectoriesin class- DirectoryScanner
- Returns:
- the names of the directories which matched at least one of the include patterns and none of the exclude patterns.
- See Also:
 
- 
getIncludedDirsCountpublic int getIncludedDirsCount()Description copied from class:DirectoryScannerReturn the count of included directories.- Overrides:
- getIncludedDirsCountin class- DirectoryScanner
- Returns:
- int.
- See Also:
 
- 
getNotIncludedDirectoriesDescription copied from class:DirectoryScannerReturn the names of the directories which matched none of the include patterns. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.- Specified by:
- getNotIncludedDirectoriesin interface- FileScanner
- Overrides:
- getNotIncludedDirectoriesin class- DirectoryScanner
- Returns:
- the names of the directories which matched none of the include patterns.
- See Also:
 
- 
getNotIncludedFilesDescription copied from class:DirectoryScannerReturn the names of the files which matched none of the include patterns. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.- Specified by:
- getNotIncludedFilesin interface- FileScanner
- Overrides:
- getNotIncludedFilesin class- DirectoryScanner
- Returns:
- the names of the files which matched none of the include patterns.
- See Also:
 
- 
setExcludesDescription copied from class:DirectoryScannerSet the list of exclude patterns to use. All '/' and '\' characters are replaced byFile.separatorChar, so the separator used need not matchFile.separatorChar.When a pattern ends with a '/' or '\', "**" is appended. - Specified by:
- setExcludesin interface- FileScanner
- Overrides:
- setExcludesin class- DirectoryScanner
- Parameters:
- excludes- A list of exclude patterns. May be- null, indicating that no files should be excluded. If a non-- nulllist is given, all elements must be non-- null.
- See Also:
 
- 
setIncludesDescription copied from class:DirectoryScannerSet the list of include patterns to use. All '/' and '\' characters are replaced byFile.separatorChar, so the separator used need not matchFile.separatorChar.When a pattern ends with a '/' or '\', "**" is appended. - Specified by:
- setIncludesin interface- FileScanner
- Overrides:
- setIncludesin class- DirectoryScanner
- Parameters:
- includes- A list of include patterns. May be- null, indicating that all files should be included. If a non-- nulllist is given, all elements must be non-- null.
- See Also:
 
- 
setCaseSensitivepublic void setCaseSensitive(boolean isCaseSensitive) Description copied from class:DirectoryScannerSet whether or not include and exclude patterns are matched in a case sensitive way.- Specified by:
- setCaseSensitivein interface- FileScanner
- Overrides:
- setCaseSensitivein class- DirectoryScanner
- Parameters:
- isCaseSensitive- whether or not the file system should be regarded as a case sensitive one.
- See Also:
 
- 
addBasedir
 
-