AbstractFileSet (Apache Ant API)
Keywords: org.apache.tools.ant.types.AbstractFileSet class

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

## org.apache.tools.ant.types
Class AbstractFileSet

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.types.DataType
              org.apache.tools.ant.types.AbstractFileSet

All Implemented Interfaces:
  java.lang.Cloneable, SelectorContainer

Direct Known Subclasses:
  DirSet, FileSet

public abstract class AbstractFileSet
extends DataType
implements java.lang.Cloneable, SelectorContainer

Class that holds an implicit patternset and supports nested patternsets and creates a DirectoryScanner using these patterns.

Common base class for DirSet and FileSet.

Author:
  Arnout J. Kuiper, Stefano Mazzocchi, Sam Ruby, Jon S. Stevens, Stefan Bodewig, Magesh Umasankar, Bruce Atherton

Field Summary

Fields inherited from class org.apache.tools.ant.types.DataType
`checked, description, ref`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`` | `AbstractFileSet()`
`protected` | `AbstractFileSet(AbstractFileSet fileset)`

Method Summary
`void` | `addAnd(AndSelector selector)` add an "And" selector entry on the selector list
`void` | `addContains(ContainsSelector selector)` add a contains selector entry on the selector list
`void` | `addCustom(ExtendSelector selector)` add an extended selector entry on the selector list
`void` | `addDate(DateSelector selector)` add a selector date entry on the selector list
`void` | `addDepend(DependSelector selector)` add a depends selector entry on the selector list
`void` | `addDepth(DepthSelector selector)` add a depth selector entry on the selector list
`void` | `addFilename(FilenameSelector selector)` add a selector filename entry on the selector list
`void` | `addMajority(MajoritySelector selector)` add a majority selector entry on the selector list
`void` | `addNone(NoneSelector selector)` add a "None" selector entry on the selector list
`void` | `addNot(NotSelector selector)` add a "Not" selector entry on the selector list
`void` | `addOr(OrSelector selector)` add an "Or" selector entry on the selector list
`void` | `addPresent(PresentSelector selector)` add a present selector entry on the selector list
`void` | `addSelector(SelectSelector selector)` add a "Select" selector entry on the selector list
`void` | `addSize(SizeSelector selector)` add a selector size entry on the selector list
`void` | `appendSelector(FileSelector selector)` Add a new selector into this container.
`PatternSet.NameEntry` | `createExclude()` add a name entry on the exclude list
`PatternSet.NameEntry` | `createExcludesFile()` add a name entry on the include files list
`PatternSet.NameEntry` | `createInclude()` add a name entry on the include list
`PatternSet.NameEntry` | `createIncludesFile()` add a name entry on the include files list
`PatternSet` | `createPatternSet()` Creates a nested patternset.
`protected java.lang.String` | `getDataTypeName()` sets the name used for this datatype instance.
`java.io.File` | `getDir(Project p)` Retrieves the base-directory for this instance.
`DirectoryScanner` | `getDirectoryScanner(Project p)` Returns the directory scanner needed to access the files to process.
`protected AbstractFileSet` | `getRef(Project p)` Performs the check for circular references and returns the referenced FileSet.
`FileSelector[]` | `getSelectors(Project p)` Returns the set of selectors as an array.
`boolean` | `hasPatterns()` Indicates whether there are any patterns here.
`boolean` | `hasSelectors()` Indicates whether there are any selectors here.
`int` | `selectorCount()` Gives the count of the number of selectors in this container
`java.util.Enumeration` | `selectorElements()` Returns an enumerator for accessing the set of selectors.
`void` | `setCaseSensitive(boolean isCaseSensitive)` Sets case sensitivity of the file system
`void` | `setDefaultexcludes(boolean useDefaultExcludes)` Sets whether default exclusions should be used or not.
`void` | `setDir(java.io.File dir)` Sets the base-directory for this instance.
`void` | `setExcludes(java.lang.String excludes)` Appends `excludes` to the current list of exclude patterns.
`void` | `setExcludesfile(java.io.File excl)` Sets the name of the file containing the includes patterns.
`void` | `setFile(java.io.File file)` Creates a single file fileset.
`void` | `setFollowSymlinks(boolean followSymlinks)` Sets whether or not symbolic links should be followed.
`void` | `setIncludes(java.lang.String includes)` Appends `includes` to the current list of include patterns.
`void` | `setIncludesfile(java.io.File incl)` Sets the name of the file containing the includes patterns.
`void` | `setRefid(Reference r)` Makes this instance in effect a reference to another instance.
`void` | `setupDirectoryScanner(FileScanner ds, Project p)`

Methods inherited from class org.apache.tools.ant.types.DataType
`circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, log, log, setProject`

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

Constructor Detail

### AbstractFileSet

    public AbstractFileSet()

### AbstractFileSet

    protected AbstractFileSet(AbstractFileSet fileset)

Method Detail

### setRefid

    public void setRefid(Reference r)
                  throws BuildException

  Makes this instance in effect a reference to another instance.

  You must not set another attribute or nest elements inside this element if you make it a reference.

  Overrides:
    `setRefid` in class `DataType`
  Throws:
    `BuildException`

### setDir

    public void setDir(java.io.File dir)
                throws BuildException

  Sets the base-directory for this instance.

  Throws:
    `BuildException`

### getDir

    public java.io.File getDir(Project p)

  Retrieves the base-directory for this instance.

### createPatternSet

    public PatternSet createPatternSet()

  Creates a nested patternset.

### createInclude

    public PatternSet.NameEntry createInclude()

  add a name entry on the include list

### createIncludesFile

    public PatternSet.NameEntry createIncludesFile()

  add a name entry on the include files list

### createExclude

    public PatternSet.NameEntry createExclude()

  add a name entry on the exclude list

### createExcludesFile

    public PatternSet.NameEntry createExcludesFile()

  add a name entry on the include files list

### setFile

    public void setFile(java.io.File file)

  Creates a single file fileset.

### setIncludes

    public void setIncludes(java.lang.String includes)

  Appends `includes` to the current list of include patterns.

  Patterns may be separated by a comma or a space.

  Parameters:
    `includes` - the string containing the include patterns

### setExcludes

    public void setExcludes(java.lang.String excludes)

  Appends `excludes` to the current list of exclude patterns.

  Patterns may be separated by a comma or a space.

  Parameters:
    `excludes` - the string containing the exclude patterns

### setIncludesfile

    public void setIncludesfile(java.io.File incl)
                         throws BuildException

  Sets the name of the file containing the includes patterns.

  Parameters:
    `incl` - The file to fetch the include patterns from.
  Throws:
    `BuildException`

### setExcludesfile

    public void setExcludesfile(java.io.File excl)
                         throws BuildException

  Sets the name of the file containing the includes patterns.

  Parameters:
    `excl` - The file to fetch the exclude patterns from.
  Throws:
    `BuildException`

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

### setCaseSensitive

    public void setCaseSensitive(boolean isCaseSensitive)

  Sets case sensitivity of the file system

  Parameters:
    `isCaseSensitive` - "true"|"on"|"yes" if file system is case sensitive, "false"|"off"|"no" when not.

### setFollowSymlinks

    public void setFollowSymlinks(boolean followSymlinks)

  Sets whether or not symbolic links should be followed.

  Parameters:
    `followSymlinks` - whether or not symbolic links should be followed

### getDataTypeName

    protected java.lang.String getDataTypeName()

  sets the name used for this datatype instance.

### getDirectoryScanner

    public DirectoryScanner getDirectoryScanner(Project p)

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

### setupDirectoryScanner

    public void setupDirectoryScanner(FileScanner ds,
                                      Project p)

### getRef

    protected AbstractFileSet getRef(Project p)

  Performs the check for circular references and returns the referenced FileSet.

### hasSelectors

    public boolean hasSelectors()

  Indicates whether there are any selectors here.

  Specified by:
    `hasSelectors` in interface `SelectorContainer`
  Returns:
    whether any selectors are in this container

### hasPatterns

    public boolean hasPatterns()

  Indicates whether there are any patterns here.

  Returns:
    whether any patterns are in this container

### selectorCount

    public int selectorCount()

  Gives the count of the number of selectors in this container

  Specified by:
    `selectorCount` in interface `SelectorContainer`
  Returns:
    the number of selectors in this container

### getSelectors

    public FileSelector[] getSelectors(Project p)

  Returns the set of selectors as an array.

  Specified by:
    `getSelectors` in interface `SelectorContainer`
  Returns:
    an array of selectors in this container

### selectorElements

    public java.util.Enumeration selectorElements()

  Returns an enumerator for accessing the set of selectors.

  Specified by:
    `selectorElements` in interface `SelectorContainer`
  Returns:
    an enumerator that goes through each of the selectors

### appendSelector

    public void appendSelector(FileSelector selector)

  Add a new selector into this container.

  Specified by:
    `appendSelector` in interface `SelectorContainer`
  Parameters:
    `selector` - the new selector to add
  Returns:
    the selector that was added

### addSelector

    public void addSelector(SelectSelector selector)

  add a "Select" selector entry on the selector list

  Specified by:
    `addSelector` in interface `SelectorContainer`

### addAnd

    public void addAnd(AndSelector selector)

  add an "And" selector entry on the selector list

  Specified by:
    `addAnd` in interface `SelectorContainer`

### addOr

    public void addOr(OrSelector selector)

  add an "Or" selector entry on the selector list

  Specified by:
    `addOr` in interface `SelectorContainer`

### addNot

    public void addNot(NotSelector selector)

  add a "Not" selector entry on the selector list

  Specified by:
    `addNot` in interface `SelectorContainer`

### addNone

    public void addNone(NoneSelector selector)

  add a "None" selector entry on the selector list

  Specified by:
    `addNone` in interface `SelectorContainer`

### addMajority

    public void addMajority(MajoritySelector selector)

  add a majority selector entry on the selector list

  Specified by:
    `addMajority` in interface `SelectorContainer`

### addDate

    public void addDate(DateSelector selector)

  add a selector date entry on the selector list

  Specified by:
    `addDate` in interface `SelectorContainer`

### addSize

    public void addSize(SizeSelector selector)

  add a selector size entry on the selector list

  Specified by:
    `addSize` in interface `SelectorContainer`

### addFilename

    public void addFilename(FilenameSelector selector)

  add a selector filename entry on the selector list

  Specified by:
    `addFilename` in interface `SelectorContainer`

### addCustom

    public void addCustom(ExtendSelector selector)

  add an extended selector entry on the selector list

  Specified by:
    `addCustom` in interface `SelectorContainer`

### addContains

    public void addContains(ContainsSelector selector)

  add a contains selector entry on the selector list

  Specified by:
    `addContains` in interface `SelectorContainer`

### addPresent

    public void addPresent(PresentSelector selector)

  add a present selector entry on the selector list

  Specified by:
    `addPresent` in interface `SelectorContainer`

### addDepth

    public void addDepth(DepthSelector selector)

  add a depth selector entry on the selector list

  Specified by:
    `addDepth` in interface `SelectorContainer`

### addDepend

    public void addDepend(DependSelector selector)

  add a depends selector entry on the selector list

  Specified by:
    `addDepend` in interface `SelectorContainer`

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

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