BaseExtendSelector (Apache Ant API)
Keywords: org.apache.tools.ant.types.selectors.BaseExtendSelector 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.selectors
Class BaseExtendSelector

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.types.DataType
              org.apache.tools.ant.types.selectors.BaseSelector
                  org.apache.tools.ant.types.selectors.BaseExtendSelector

All Implemented Interfaces:
  ExtendFileSelector, FileSelector, Parameterizable

Direct Known Subclasses:
  ContainsSelector, DateSelector, DepthSelector, FilenameSelector, SizeSelector

public abstract class BaseExtendSelector
extends BaseSelector
implements ExtendFileSelector

Convenience base class for all selectors accessed through ExtendSelector. It provides support for gathering the parameters together as well as for assigning an error message and throwing a build exception if an error is detected.

Since:
  1.5
Author:
  Bruce Atherton

Field Summary
`protected Parameter[]` | `parameters` The passed in parameter array.

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
`BaseExtendSelector()` Default constructor.

Method Summary
`protected Parameter[]` | `getParameters()` Allows access to the parameters gathered and set within the <custom> tag.
`abstract boolean` | `isSelected(java.io.File basedir, java.lang.String filename, java.io.File file)` Method that each selector will implement to create their selection behaviour.
`void` | `setParameters(Parameter[] parameters)` Set all the Parameters for this custom selector, collected by the ExtendSelector class.

Methods inherited from class org.apache.tools.ant.types.selectors.BaseSelector
`getError, setError, validate, verifySettings`

Methods inherited from class org.apache.tools.ant.types.DataType
`circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, setRefid, 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`

Field Detail

### parameters

    protected Parameter[] parameters

  The passed in parameter array.

Constructor Detail

### BaseExtendSelector

    public BaseExtendSelector()

  Default constructor.

Method Detail

### setParameters

    public void setParameters(Parameter[] parameters)

  Set all the Parameters for this custom selector, collected by the ExtendSelector class.

  Specified by:
    `setParameters` in interface `Parameterizable`
  Parameters:
    `parameters` - the complete set of parameters for this selector

### getParameters

    protected Parameter[] getParameters()

  Allows access to the parameters gathered and set within the <custom> tag.

  Returns:
    the set of parameters defined for this selector

### isSelected

    public abstract boolean isSelected(java.io.File basedir,
                                       java.lang.String filename,
                                       java.io.File file)
                                throws BuildException

  Method that each selector will implement to create their selection behaviour. If there is a problem with the setup of a selector, it can throw a BuildException to indicate the problem.

  Specified by:
    `isSelected` in interface `FileSelector`
  Specified by:
    `isSelected` in class `BaseSelector`
  Parameters:
    `basedir` - A java.io.File object for the base directory
    `filename` - The name of the file to check
    `file` - A File object for this filename
  Returns:
    whether the file should be selected or not
  Throws:
    `BuildException`

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.