| org.apache.tools.ant.types.selectors.BaseSelector org.apache.tools.ant.types.selectors.BaseExtendSelector org.apache.tools.ant.types.selectors.FilenameSelector
FilenameSelector | public class FilenameSelector extends BaseExtendSelector (Code) | | Selector that filters files based on the filename.
since: 1.5 |
Constructor Summary | |
public | FilenameSelector() Creates a new FilenameSelector instance. |
Method Summary | |
public boolean | isSelected(File basedir, String filename, File file) The heart of the matter. | 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. | public void | setParameters(Parameter[] parameters) When using this as a custom selector, this method will be called. | public String | toString() | public void | verifySettings() Checks to make sure all settings are kosher. |
CASE_KEY | final public static String CASE_KEY(Code) | | Used for parameterized custom selector
|
NAME_KEY | final public static String NAME_KEY(Code) | | Used for parameterized custom selector
|
NEGATE_KEY | final public static String NEGATE_KEY(Code) | | Used for parameterized custom selector
|
FilenameSelector | public FilenameSelector()(Code) | | Creates a new FilenameSelector instance.
|
isSelected | public boolean isSelected(File basedir, String filename, File file)(Code) | | 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.
Parameters: basedir - the base directory the scan is being done from Parameters: filename - is the name of the file to check Parameters: file - is a java.io.File object the selector can use whether the file should be selected or not |
setCasesensitive | public void setCasesensitive(boolean casesensitive)(Code) | | Whether to ignore case when checking filenames.
Parameters: casesensitive - whether to pay attention to case sensitivity |
setName | public void setName(String pattern)(Code) | | The name of the file, or the pattern for the name, that
should be used for selection.
Parameters: pattern - the file pattern that any filename must matchagainst in order to be selected. |
setNegate | public void setNegate(boolean negated)(Code) | | 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>.
Parameters: negated - whether to negate this selection |
setParameters | public void setParameters(Parameter[] parameters)(Code) | | When using this as a custom selector, this method will be called.
It translates each parameter into the appropriate setXXX() call.
Parameters: parameters - the complete set of parameters for this selector |
toString | public String toString()(Code) | | a string describing this object |
verifySettings | public void verifySettings()(Code) | | Checks to make sure all settings are kosher. In this case, it
means that the name attribute has been set.
|
Fields inherited from org.apache.tools.ant.types.selectors.BaseExtendSelector | protected Parameter[] parameters(Code)(Java Doc)
|
|
|