Save This Page
Home » apache-ant-1.8.1 » org.apache.tools » ant » types » selectors » [javadoc | source]
org.apache.tools.ant.types.selectors
public class: ContainsSelector [javadoc | source]
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
               org.apache.tools.ant.types.selectors.ContainsSelector

All Implemented Interfaces:
    ResourceSelector, ExtendFileSelector, FileSelector, Cloneable

Selector that filters files/resources based on whether they contain a particular string.
Field Summary
public static final  String EXPRESSION_KEY    Key to used for parameterized custom selector 
public static final  String CONTAINS_KEY    Used for parameterized custom selector 
public static final  String CASE_KEY    Used for parameterized custom selector 
public static final  String WHITESPACE_KEY    Used for parameterized custom selector 
Fields inherited from org.apache.tools.ant.types.selectors.BaseExtendSelector:
parameters
Fields inherited from org.apache.tools.ant.types.DataType:
ref,  checked
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Constructor:
 public ContainsSelector() 
Method from org.apache.tools.ant.types.selectors.ContainsSelector Summary:
isSelected,   isSelected,   setCasesensitive,   setIgnorewhitespace,   setParameters,   setText,   toString,   verifySettings
Methods from org.apache.tools.ant.types.selectors.BaseExtendSelector:
getParameters,   isSelected,   setParameters
Methods from org.apache.tools.ant.types.selectors.BaseSelector:
getError,   isSelected,   setError,   validate,   verifySettings
Methods from org.apache.tools.ant.types.DataType:
checkAttributesAllowed,   checkChildrenAllowed,   circularReference,   clone,   dieOnCircularReference,   dieOnCircularReference,   dieOnCircularReference,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getDataTypeName,   getRefid,   invokeCircularReferenceCheck,   isChecked,   isReference,   noChildrenAllowed,   pushAndInvokeCircularReferenceCheck,   setChecked,   setRefid,   toString,   tooManyAttributes
Methods from org.apache.tools.ant.ProjectComponent:
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 org.apache.tools.ant.types.selectors.ContainsSelector Detail:
 public boolean isSelected(Resource r) 
    The heart of the matter. This is where the selector gets to decide on the inclusion of a Resource.
 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.
 public  void setCasesensitive(boolean casesensitive) 
    Whether to ignore case in the string being searched.
 public  void setIgnorewhitespace(boolean ignorewhitespace) 
    Whether to ignore whitespace in the string being searched.
 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 setText(String contains) 
    The string to search for within a file.
 public String toString() 
 public  void verifySettings() 
    Checks to make sure all settings are kosher. In this case, it means that the pattern attribute has been set.