public class ContainsSelector extends BaseExtendSelector
| Modifier and Type | Field and Description |
|---|---|
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
|
parameters| Constructor and Description |
|---|
ContainsSelector()
Creates a new
ContainsSelector instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSelected(InstallData idata,
File basedir,
String filename,
File file)
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.
|
getParametersgetError, setError, validategetDescription, isChecked, noChildrenAllowed, setChecked, setDescription, tooManyAttributespublic static final String EXPRESSION_KEY
public static final String CONTAINS_KEY
public static final String CASE_KEY
public static final String WHITESPACE_KEY
public ContainsSelector()
ContainsSelector instance.public String toString()
public void setText(String contains)
contains - the string that a file must contain to be selected.public void setCasesensitive(boolean casesensitive)
casesensitive - whether to pay attention to case sensitivitypublic void setIgnorewhitespace(boolean ignorewhitespace)
ignorewhitespace - whether to ignore any whitespace
(spaces, tabs, etc.) in the searchstringpublic void setParameters(Parameter[] parameters)
setParameters in interface ParameterizablesetParameters in class BaseExtendSelectorparameters - the complete set of parameters for this selectorpublic void verifySettings()
verifySettings in class BaseSelectorpublic boolean isSelected(InstallData idata, File basedir, String filename, File file) throws Exception
isSelected in interface FileSelectorisSelected in class BaseExtendSelectorbasedir - the base directory the scan is being done fromfilename - is the name of the file to checkfile - is a java.io.File object the selector can useException - if the selector was not configured correctlyCopyright © 2001–2025. All rights reserved.