Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.ide
Class VAJWorkspaceScanner

    java.lang.Object
      |
      +--org.apache.tools.ant.DirectoryScanner
            |
            +--org.apache.tools.ant.taskdefs.optional.ide.VAJWorkspaceScanner

All Implemented Interfaces:
  FileScanner

public class VAJWorkspaceScanner
extends DirectoryScanner

Class for scanning a Visual Age for Java workspace for packages matching a certain criteria.

These criteria consist of a set of include and exclude patterns. With these patterns, you can select which packages you want to have included, and which packages you want to have excluded. You can add patterns to be excluded by default with the addDefaultExcludes method. The patters that are excluded by default include

- IBM*\**
- Java class libraries\**
- Sun class libraries*\**
- JSP Page Compile Generated Code\**
- VisualAge*\**

This class works like DirectoryScanner.

Author:
  Wolf Siberski, TUI Infotec (based on Arnout J. Kuipers DirectoryScanner)
See Also:
  `DirectoryScanner`

Fields inherited from class org.apache.tools.ant.DirectoryScanner
`basedir, DEFAULTEXCLUDES, dirsExcluded, dirsIncluded, dirsNotIncluded, excludes, filesExcluded, filesIncluded, filesNotIncluded, haveSlowResults, includes`

Constructor Summary
`VAJWorkspaceScanner()`

Method Summary
`void` | `addDefaultExcludes()` Adds the array with default exclusions to the current exclusions set.
`java.util.Vector` | `findMatchingProjects()` Finds all Projects specified in include patterns.
`com.ibm.ivj.util.base.Package[]` | `getIncludedPackages()` Get the names of the packages that matched at least one of the include patterns, and didn't match one of the exclude patterns.
`protected static boolean` | `match(java.lang.String pattern, java.lang.String str)` Matches a string against a pattern.
`void` | `scan()` Scans the workspace for packages that match at least one include pattern, and don't match any exclude patterns.
`void` | `scanProject(com.ibm.ivj.util.base.Project project)` Scans a project for packages that match at least one include pattern, and don't match any exclude patterns.

Methods inherited from class org.apache.tools.ant.DirectoryScanner
`couldHoldIncluded, getBasedir, getExcludedDirectories, getExcludedFiles, getIncludedDirectories, getIncludedFiles, getNotIncludedDirectories, getNotIncludedFiles, isExcluded, isIncluded, matchPath, matchPatternStart, scandir, setBasedir, setBasedir, setExcludes, setIncludes, slowScan`

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

Constructor Detail

### VAJWorkspaceScanner

    public VAJWorkspaceScanner()

Method Detail

### addDefaultExcludes

    public void addDefaultExcludes()

  Adds the array with default exclusions to the current exclusions set.
  Overrides:
    `addDefaultExcludes` in class `DirectoryScanner`

### findMatchingProjects

    public java.util.Vector findMatchingProjects()

  Finds all Projects specified in include patterns.
  Returns:
    the projects

### getIncludedPackages

    public com.ibm.ivj.util.base.Package[] getIncludedPackages()

  Get the names of the packages that matched at least one of the include patterns, and didn't match one of the exclude patterns.
  Returns:
    the matching packages

### match

    protected static boolean match(java.lang.String pattern,
                                   java.lang.String str)

  Matches a string against a pattern. The pattern contains two special characters: '*' which means zero or more characters, '?' which means one and only one character.
  Parameters:
    `pattern` - the (non-null) pattern to match against
    `str` - the (non-null) string that must be matched against the pattern
  Returns:
    `true` when the string matches against the pattern, `false` otherwise.

### scan

    public void scan()

  Scans the workspace for packages that match at least one include pattern, and don't match any exclude patterns.
  Overrides:
    `scan` in class `DirectoryScanner`
  Following copied from class: `org.apache.tools.ant.DirectoryScanner`
  Throws:
    `java.lang.IllegalStateException` - when basedir was set incorrecly

### scanProject

    public void scanProject(com.ibm.ivj.util.base.Project project)

  Scans a project for packages that match at least one include pattern, and don't match any exclude patterns.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.