| org.apache.tools.ant.types.selectors.BaseSelector org.apache.tools.ant.types.selectors.MappingSelector
All known Subclasses: org.apache.tools.ant.types.selectors.DifferentSelector, org.apache.tools.ant.types.selectors.DependSelector,
MappingSelector | abstract public class MappingSelector extends BaseSelector (Code) | | A mapping selector is an abstract class adding mapping support to the base
selector
|
Constructor Summary | |
public | MappingSelector() Creates a new MappingSelector instance. |
Method Summary | |
public Mapper | createMapper() Defines the FileNameMapper to use (nested mapper element). | public boolean | isSelected(File basedir, String filename, File file) The heart of the matter. | abstract protected boolean | selectionTest(File srcfile, File destfile) | public void | setGranularity(int granularity) Sets the number of milliseconds leeway we will give before we consider
a file out of date. | public void | setTargetdir(File targetdir) The name of the file or directory which is checked for out-of-date
files. | public void | verifySettings() Checks to make sure all settings are kosher. |
granularity | protected int granularity(Code) | | |
MappingSelector | public MappingSelector()(Code) | | Creates a new MappingSelector instance.
|
createMapper | public Mapper createMapper() throws BuildException(Code) | | Defines the FileNameMapper to use (nested mapper element).
a mapper to be configured throws: BuildException - if more that one mapper defined |
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.
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 |
selectionTest | abstract protected boolean selectionTest(File srcfile, File destfile)(Code) | | this test is our selection test that compared the file with the destfile
Parameters: srcfile - file to test; may be null Parameters: destfile - destination file true if source file compares with destination file |
setGranularity | public void setGranularity(int granularity)(Code) | | Sets the number of milliseconds leeway we will give before we consider
a file out of date. Defaults to 2000 on MS-DOS derivatives and 1000 on
others.
Parameters: granularity - the leeway in milliseconds |
setTargetdir | public void setTargetdir(File targetdir)(Code) | | The name of the file or directory which is checked for out-of-date
files.
Parameters: targetdir - the directory to scan looking for files. |
verifySettings | public void verifySettings()(Code) | | Checks to make sure all settings are kosher. In this case, it
means that the dest attribute has been set and we have a mapper.
|
|
|