FileDocCategorySizeDatePackage
BaseExtendSelector.javaAPI DocApache Ant 1.702849Wed Dec 13 06:16:18 GMT 2006org.apache.tools.ant.types.selectors

BaseExtendSelector

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

Fields Summary
protected org.apache.tools.ant.types.Parameter[]
parameters
The passed in parameter array.
Constructors Summary
public BaseExtendSelector()
Default constructor.


    // CheckStyle:VisibilityModifier ON

           
      
    
Methods Summary
protected org.apache.tools.ant.types.Parameter[]getParameters()
Allows access to the parameters gathered and set within the <custom> tag.

return
the set of parameters defined for this selector

        return parameters;
    
public abstract booleanisSelected(java.io.File basedir, java.lang.String filename, java.io.File file)
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.

param
basedir A java.io.File object for the base directory
param
filename The name of the file to check
param
file A File object for this filename
return
whether the file should be selected or not
exception
BuildException if an error occurs

public voidsetParameters(org.apache.tools.ant.types.Parameter[] parameters)
Set all the Parameters for this custom selector, collected by the ExtendSelector class.

param
parameters the complete set of parameters for this selector

        this.parameters = parameters;