org.apache.tools.ant.types.selectors
public class ContainsRegexpSelector extends BaseExtendSelector implements ResourceSelector
Since: Ant 1.6
| Field Summary | |
|---|---|
| static String | EXPRESSION_KEY Key to used for parameterized custom selector |
| Constructor Summary | |
|---|---|
| ContainsRegexpSelector()
Creates a new ContainsRegexpSelector instance. | |
| Method Summary | |
|---|---|
| boolean | isSelected(File basedir, String filename, File file)
Tests a regular expression against each line of text in the file.
|
| boolean | isSelected(Resource r)
Tests a regular expression against each line of text in a Resource.
|
| void | setCaseSensitive(boolean b)
Whether to ignore case or not. |
| void | setExpression(String theexpression)
The regular expression used to search the file.
|
| void | setMultiLine(boolean b)
Whether to match should be multiline. |
| void | setParameters(Parameter[] parameters)
When using this as a custom selector, this method will be called.
|
| void | setSingleLine(boolean b)
Whether to treat input as singleline ('.' matches newline).
|
| String | toString() |
| void | verifySettings()
Checks that an expression was specified.
|
ContainsRegexpSelector 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 or not
Parameters: b if false, ignore case.
Since: Ant 1.8.2
Parameters: theexpression this must match a line in the file to be selected.
Parameters: b the value to set.
Since: Ant 1.8.2
Parameters: parameters the complete set of parameters for this selector
Parameters: b the value to set.
Since: Ant 1.8.2
Returns: a string describing this object