org.apache.tools.ant.types.selectors
public class ContainsSelector extends BaseExtendSelector implements ResourceSelector
Since: 1.5
| Field Summary | |
|---|---|
| static String | CASE_KEY Used for parameterized custom selector |
| static String | CONTAINS_KEY Used for parameterized custom selector |
| static String | EXPRESSION_KEY Key to used for parameterized custom selector |
| static String | WHITESPACE_KEY Used for parameterized custom selector |
| Constructor Summary | |
|---|---|
| ContainsSelector()
Creates a new ContainsSelector instance.
| |
| Method Summary | |
|---|---|
| boolean | isSelected(File basedir, String filename, File file)
The heart of the matter. |
| boolean | isSelected(Resource r)
The heart of the matter. |
| void | setCasesensitive(boolean casesensitive)
Whether to ignore case in the string being searched.
|
| void | setIgnorewhitespace(boolean ignorewhitespace)
Whether to ignore whitespace in the string being searched.
|
| void | setParameters(Parameter[] parameters)
When using this as a custom selector, this method will be called.
|
| void | setText(String contains)
The string to search for within a file.
|
| String | toString() |
| void | verifySettings()
Checks to make sure all settings are kosher. |
ContainsSelector instance.
Parameters: basedir the base directory the scan is being done from filename is the name of the file to check file is a java.io.File object the selector can use
Returns: whether the file should be selected or not
Parameters: r the Resource to check.
Returns: whether the Resource is selected.
Parameters: casesensitive whether to pay attention to case sensitivity
Parameters: ignorewhitespace whether to ignore any whitespace (spaces, tabs, etc.) in the searchstring
Parameters: parameters the complete set of parameters for this selector
Parameters: contains the string that a file must contain to be selected.
Returns: a string describing this object