org.apache.tools.ant.types.selectors
public abstract class MappingSelector extends BaseSelector
Field Summary | |
---|---|
protected int | granularity |
protected FileNameMapper | map |
protected Mapper | mapperElement |
protected File | targetdir |
Constructor Summary | |
---|---|
MappingSelector()
Creates a new MappingSelector instance.
|
Method Summary | |
---|---|
void | addConfigured(FileNameMapper fileNameMapper)
Add a configured FileNameMapper instance. |
Mapper | createMapper()
Defines the FileNameMapper to use (nested mapper element). |
boolean | isSelected(File basedir, String filename, File file)
The heart of the matter. |
protected abstract boolean | selectionTest(File srcfile, File destfile)
this test is our selection test that compared the file with the destfile |
void | setGranularity(int granularity)
Sets the number of milliseconds leeway we will give before we consider
a file out of date. |
void | setTargetdir(File targetdir)
The name of the file or directory which is checked for out-of-date
files.
|
void | verifySettings()
Checks to make sure all settings are kosher. |
MappingSelector
instance.
Parameters: fileNameMapper the FileNameMapper to add
Throws: BuildException if more than one mapper defined
Since: Ant 1.8.0
Returns: a mapper to be configured
Throws: BuildException if more than one mapper defined
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: srcfile file to test; may be null destfile destination file
Returns: true if source file compares with destination file
Parameters: granularity the leeway in milliseconds
Parameters: targetdir the directory to scan looking for files.