Save This Page
Home » apache-ant-1.8.1 » » ant » types » selectors » [javadoc | source]
public class: FilenameSelector [javadoc | source]

All Implemented Interfaces:
    ExtendFileSelector, FileSelector, Cloneable

Selector that filters files based on the filename.
Field Summary
public static final  String NAME_KEY    Used for parameterized custom selector 
public static final  String CASE_KEY    Used for parameterized custom selector 
public static final  String NEGATE_KEY    Used for parameterized custom selector 
public static final  String REGEX_KEY    Used for parameterized custom selector 
Fields inherited from
Fields inherited from
ref,  checked
Fields inherited from
project,  location,  description
 public FilenameSelector() 
Method from Summary:
isSelected,   setCasesensitive,   setName,   setNegate,   setParameters,   setRegex,   toString,   verifySettings
Methods from
getParameters,   isSelected,   setParameters
Methods from
getError,   isSelected,   setError,   validate,   verifySettings
Methods from
checkAttributesAllowed,   checkChildrenAllowed,   circularReference,   clone,   dieOnCircularReference,   dieOnCircularReference,   dieOnCircularReference,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getDataTypeName,   getRefid,   invokeCircularReferenceCheck,   isChecked,   isReference,   noChildrenAllowed,   pushAndInvokeCircularReferenceCheck,   setChecked,   setRefid,   toString,   tooManyAttributes
Methods from
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from Detail:
 public boolean isSelected(File basedir,
    String filename,
    File file) 
    The heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset. Most of the work for this selector is offloaded into SelectorUtils, a static class that provides the same services for both FilenameSelector and DirectoryScanner.
 public  void setCasesensitive(boolean casesensitive) 
    Whether to ignore case when checking filenames.
 public  void setName(String pattern) 
    The name of the file, or the pattern for the name, that should be used for selection.
 public  void setNegate(boolean negated) 
    You can optionally reverse the selection of this selector, thereby emulating an <exclude> tag, by setting the attribute negate to true. This is identical to surrounding the selector with <not></not>.
 public  void setParameters(Parameter[] parameters) 
    When using this as a custom selector, this method will be called. It translates each parameter into the appropriate setXXX() call.
 public  void setRegex(String pattern) 
    The regular expression the file name will be matched against.
 public String toString() 
 public  void verifySettings() 
    Checks to make sure all settings are kosher. In this case, it means that the name attribute has been set.