Ant API: Class MatchingTask

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
Class MatchingTask

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.MatchingTask

Direct Known Subclasses:
  Copydir, FixCRLF, Javac, NetRexxC, RenameExtensions, Tar, Zip

public abstract class MatchingTask
extends Task

This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.

Author:
  Arnout J. Kuiper ajkuiper@wxs.nl, Stefano Mazzocchi stefano@apache.org, Sam Ruby rubys@us.ibm.com, Jon S. Stevens jon@clearink.com

Inner Class Summary
`class` | `MatchingTask.NameEntry` inner class to hold a name on list.

Field Summary
`protected java.util.Vector` | `excludeList`
`protected java.util.Vector` | `includeList`
`protected boolean` | `useDefaultExcludes`

Fields inherited from class org.apache.tools.ant.Task
`description, project, target`

Constructor Summary
`MatchingTask()`

Method Summary
`MatchingTask.NameEntry` | `createExclude()` add a name entry on the exclude list
`MatchingTask.NameEntry` | `createInclude()` add a name entry on the include list
`protected DirectoryScanner` | `getDirectoryScanner(java.io.File baseDir)` Returns the directory scanner needed to access the files to process.
`protected java.lang.String` | `getProperty(java.lang.String name)` provide access to properties from within the inner class
`void` | `setDefaultexcludes(java.lang.String useDefaultExcludes)` Sets whether default exclusions should be used or not.
`void` | `setExcludes(java.lang.String excludes)` Sets the set of exclude patterns.
`void` | `setIgnore(java.lang.String ignoreString)` List of filenames and directory names to not include.
`void` | `setIncludes(java.lang.String includes)` Sets the set of include patterns.
`void` | `setItems(java.lang.String itemString)` Set this to be the items in the base directory that you want to be included.

Methods inherited from class org.apache.tools.ant.Task
`execute, getDescription, init, setDescription, setTarget`

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

Field Detail

### includeList

    protected java.util.Vector includeList

### excludeList

    protected java.util.Vector excludeList

### useDefaultExcludes

    protected boolean useDefaultExcludes

Constructor Detail

### MatchingTask

    public MatchingTask()

Method Detail

### getProperty

    protected java.lang.String getProperty(java.lang.String name)

  provide access to properties from within the inner class

### createInclude

    public MatchingTask.NameEntry createInclude()

  add a name entry on the include list

### createExclude

    public MatchingTask.NameEntry createExclude()

  add a name entry on the exclude list

### setIncludes

    public void setIncludes(java.lang.String includes)

  Sets the set of include patterns. Patterns may be separated by a comma or a space.
  Parameters:
    `includes` - the string containing the include patterns

### setItems

    public void setItems(java.lang.String itemString)

  Set this to be the items in the base directory that you want to be included. You can also specify "*" for the items (ie: items="*") and it will include all the items in the base directory.
  Parameters:
    `itemString` - the string containing the files to include.

### setExcludes

    public void setExcludes(java.lang.String excludes)

  Sets the set of exclude patterns. Patterns may be separated by a comma or a space.
  Parameters:
    `excludes` - the string containing the exclude patterns

### setIgnore

    public void setIgnore(java.lang.String ignoreString)

  List of filenames and directory names to not include. They should be either , or " " (space) separated. The ignored files will be logged.
  Parameters:
    `ignoreString` - the string containing the files to ignore.

### setDefaultexcludes

    public void setDefaultexcludes(java.lang.String useDefaultExcludes)

  Sets whether default exclusions should be used or not.
  Parameters:
    `useDefaultExcludes` - "true"|"on"|"yes" when default exclusions should be used, "false"|"off"|"no" when they shouldn't be used.

### getDirectoryScanner

    protected DirectoryScanner getDirectoryScanner(java.io.File baseDir)

  Returns the directory scanner needed to access the files to process.

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.