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:
  Cab, Copydir, CSharp, DDCreator, Delete, Depend, Ejbc, EjbJar, Expand, FixCRLF, Ilasm, Javac, JlinkTask, Native2Ascii, NetRexxC, RenameExtensions, Replace, Rmic, Tar, UpToDate, WLJspc, XSLTProcess, 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, Stefan Bodewig

Field Summary
`protected FileSet` | `fileset`
`protected boolean` | `useDefaultExcludes`

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`MatchingTask()`

Method Summary
`PatternSet.NameEntry` | `createExclude()` add a name entry on the exclude list
`PatternSet.NameEntry` | `createInclude()` add a name entry on the include list
`PatternSet` | `createPatternSet()` add a set of patterns
`protected DirectoryScanner` | `getDirectoryScanner(java.io.File baseDir)` Returns the directory scanner needed to access the files to process.
`void` | `setDefaultexcludes(boolean useDefaultExcludes)` Sets whether default exclusions should be used or not.
`void` | `setExcludes(java.lang.String excludes)` Sets the set of exclude patterns.
`void` | `setExcludesfile(java.io.File excludesfile)` Sets the name of the file containing the includes patterns.
`void` | `setIncludes(java.lang.String includes)` Sets the set of include patterns.
`void` | `setIncludesfile(java.io.File includesfile)` Sets the name of the file containing the includes patterns.
`void` | `XsetIgnore(java.lang.String ignoreString)` List of filenames and directory names to not include.
`void` | `XsetItems(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, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

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

Field Detail

### useDefaultExcludes

    protected boolean useDefaultExcludes

### fileset

    protected FileSet fileset

Constructor Detail

### MatchingTask

    public MatchingTask()

Method Detail

### createInclude

    public PatternSet.NameEntry createInclude()

  add a name entry on the include list

### createExclude

    public PatternSet.NameEntry createExclude()

  add a name entry on the exclude list

### createPatternSet

    public PatternSet createPatternSet()

  add a set of patterns

### 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

### XsetItems

    public void XsetItems(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

### XsetIgnore

    public void XsetIgnore(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(boolean 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.

### setIncludesfile

    public void setIncludesfile(java.io.File includesfile)

  Sets the name of the file containing the includes patterns.
  Parameters:
    `includesfile` - A string containing the filename to fetch the include patterns from.

### setExcludesfile

    public void setExcludesfile(java.io.File excludesfile)

  Sets the name of the file containing the includes patterns.
  Parameters:
    `excludesfile` - A string containing the filename to fetch the include patterns from.

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.