## org.apache.tools.ant.types.optional.depend
Class DependScanner

    java.lang.Object
      org.apache.tools.ant.DirectoryScanner
          org.apache.tools.ant.types.optional.depend.DependScanner

All Implemented Interfaces:
  FileScanner, ResourceFactory, SelectorScanner

public class DependScanner
extends DirectoryScanner

An interface used to describe the actions required by any type of directory scanner.

Author:
  Conor MacNeill, Holger Engels

Field Summary
`static java.lang.String` `DEFAULT_ANALYZER_CLASS` The name of the analyzer to use by default.

Fields inherited from class org.apache.tools.ant.DirectoryScanner
`DEFAULTEXCLUDES, dirsDeselected, dirsExcluded, dirsIncluded, dirsNotIncluded, everythingIncluded, excludes, filesDeselected, filesExcluded, filesIncluded, filesNotIncluded, haveSlowResults, includes, isCaseSensitive, selectors`

Constructor Summary
`DependScanner(DirectoryScanner parentScanner)` Create a DependScanner, using the given scanner to provide the basic set of files from which class files come.

Method Summary
`void` `addDefaultExcludes()` Adds default exclusions to the current exclusions set.
`java.io.File` `getBasedir()` Gets the basedir that is used for scanning.
`java.lang.String[]` `getExcludedDirectories()` Returns 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()` Returns 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()` Returns the names of the directories which matched at least one of the include patterns and none of the exclude patterns.
`java.lang.String[]` `getIncludedFiles()` Get the names of the class files, baseClass depends on
`java.lang.String[]` `getNotIncludedDirectories()` Returns the names of the directories which matched none of the include patterns.
`java.lang.String[]` `getNotIncludedFiles()` Returns the names of the files which matched none of the include patterns.
`void` `scan()` Scans the base directory for files that baseClass depends on
`void` `setBasedir(java.io.File basedir)` Sets the basedir for scanning.
`void` `setCaseSensitive(boolean isCaseSensitive)` Sets whether or not the file system should be regarded as case sensitive.
`void` `setExcludes(java.lang.String[] excludes)` Sets the list of exclude patterns to use.
`void` `setIncludes(java.lang.String[] includes)` Sets the list of include patterns to use.
`void` `setRootClasses(java.util.Vector rootClasses)` Sets the root classes to be used to drive the scan.

Methods inherited from class org.apache.tools.ant.DirectoryScanner
`couldHoldIncluded, getDeselectedDirectories, getDeselectedFiles, getResource, isEverythingIncluded, isExcluded, isIncluded, isSelected, match, match, matchPath, matchPath, matchPatternStart, matchPatternStart, scandir, setBasedir, setFollowSymlinks, setSelectors, slowScan`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_ANALYZER_CLASS

    public static final java.lang.String DEFAULT_ANALYZER_CLASS

  The name of the analyzer to use by default.

  See Also:
    Constant Field Values

Constructor Detail

### DependScanner

    public DependScanner(DirectoryScanner parentScanner)

  Create 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 Detail

### setBasedir

    public void setBasedir(java.io.File basedir)

  Sets the basedir for scanning. This is the directory that is scanned recursively.

  Specified by:
    `setBasedir` in interface `FileScanner`
  Overrides:
    `setBasedir` in class `DirectoryScanner`
  Parameters:
    `basedir` - the basedir for scanning

### getBasedir

    public java.io.File getBasedir()

  Gets the basedir that is used for scanning.

  Specified by:
    `getBasedir` in interface `FileScanner`
  Overrides:
    `getBasedir` in class `DirectoryScanner`
  Returns:
    the basedir that is used for scanning

### setRootClasses

    public void setRootClasses(java.util.Vector rootClasses)

  Sets the root classes to be used to drive the scan.

  Parameters:
    `rootClasses` - the rootClasses to be used for this scan

### getIncludedFiles

    public java.lang.String[] getIncludedFiles()

  Get the names of the class files, baseClass depends on

  Specified by:
    `getIncludedFiles` in interface `FileScanner`
  Overrides:
    `getIncludedFiles` in class `DirectoryScanner`
  Returns:
    the names of the files

### scan

    public void scan()
              throws java.lang.IllegalStateException

  Scans the base directory for files that baseClass depends on

  Specified by:
    `scan` in interface `FileScanner`
  Overrides:
    `scan` in class `DirectoryScanner`
  Throws:
    `java.lang.IllegalStateException` - when basedir was set incorrecly

### addDefaultExcludes

    public void addDefaultExcludes()

  Description copied from class: `DirectoryScanner`
  Adds default exclusions to the current exclusions set.

  Specified by:
    `addDefaultExcludes` in interface `FileScanner`
  Overrides:
    `addDefaultExcludes` in class `DirectoryScanner`
  See Also:
    `DirectoryScanner.addDefaultExcludes()`

### getExcludedDirectories

    public java.lang.String[] getExcludedDirectories()

  Description copied from 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. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.

  Specified by:
    `getExcludedDirectories` in interface `FileScanner`
  Overrides:
    `getExcludedDirectories` in 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:
    `DirectoryScanner.getExcludedDirectories()`

### getExcludedFiles

    public java.lang.String[] getExcludedFiles()

  Description copied from 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. The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.

  Specified by:
    `getExcludedFiles` in interface `FileScanner`
  Overrides:
    `getExcludedFiles` in class `DirectoryScanner`
  Returns:
    the names of the files which matched at least one of the include patterns and at at least one of the exclude patterns.
  See Also:
    `DirectoryScanner.getExcludedFiles()`

### getIncludedDirectories

    public java.lang.String[] getIncludedDirectories()

  Description copied from class: `DirectoryScanner`
  Returns 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:
    `getIncludedDirectories` in interface `FileScanner`
  Overrides:
    `getIncludedDirectories` in 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:
    `DirectoryScanner.getIncludedDirectories()`

### getNotIncludedDirectories

    public java.lang.String[] getNotIncludedDirectories()

  Description copied from class: `DirectoryScanner`
  Returns 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:
    `getNotIncludedDirectories` in interface `FileScanner`
  Overrides:
    `getNotIncludedDirectories` in class `DirectoryScanner`
  Returns:
    the names of the directories which matched none of the include patterns.
  See Also:
    `DirectoryScanner.getNotIncludedDirectories()`

### getNotIncludedFiles

    public java.lang.String[] getNotIncludedFiles()

  Description copied from class: `DirectoryScanner`
  Returns 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:
    `getNotIncludedFiles` in interface `FileScanner`
  Overrides:
    `getNotIncludedFiles` in class `DirectoryScanner`
  Returns:
    the names of the files which matched none of the include patterns.
  See Also:
    `DirectoryScanner.getNotIncludedFiles()`

### setExcludes

    public void setExcludes(java.lang.String[] excludes)

  Description copied from class: `DirectoryScanner`
  Sets the list of exclude patterns to use. All '/' and '\' characters are replaced by `File.separatorChar`, so the separator used need not match `File.separatorChar`.

  When a pattern ends with a '/' or '\', "**" is appended.

  Specified by:
    `setExcludes` in interface `FileScanner`
  Overrides:
    `setExcludes` in class `DirectoryScanner`
  Parameters:
    `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`.
  See Also:
    `DirectoryScanner.setExcludes(java.lang.String[])`

### setIncludes

    public void setIncludes(java.lang.String[] includes)

  Description copied from class: `DirectoryScanner`
  Sets the list of include patterns to use. All '/' and '\' characters are replaced by `File.separatorChar`, so the separator used need not match `File.separatorChar`.

  When a pattern ends with a '/' or '\', "**" is appended.

  Specified by:
    `setIncludes` in interface `FileScanner`
  Overrides:
    `setIncludes` in class `DirectoryScanner`
  Parameters:
    `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`.
  See Also:
    `DirectoryScanner.setIncludes(java.lang.String[])`

### setCaseSensitive

    public void setCaseSensitive(boolean isCaseSensitive)

  Description copied from class: `DirectoryScanner`
  Sets whether or not the file system should be regarded as case sensitive.

  Specified by:
    `setCaseSensitive` in interface `FileScanner`
  Overrides:
    `setCaseSensitive` in class `DirectoryScanner`
  Parameters:
    `isCaseSensitive` - whether or not the file system should be regarded as a case sensitive one
  See Also:
    `DirectoryScanner.setCaseSensitive(boolean)`

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.