Class ScriptMapper
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.optional.AbstractScriptComponent
org.apache.tools.ant.types.optional.ScriptMapper
- All Implemented Interfaces:
- Cloneable,- FileNameMapper
Script support at map time.
- Since:
- Ant1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddMappedName(String mapping) Add a mapped namevoidclear()Reset the list of filesString[]mapFileName(String sourceFileName) Returns an array containing the target filename(s) for the given source file.voidSets the from part of the transformation rule.voidSets the to part of the transformation rule.Methods inherited from class org.apache.tools.ant.types.optional.AbstractScriptComponentaddText, createClasspath, executeScript, getRunner, initScriptRunner, setClasspath, setClasspathRef, setEncoding, setLanguage, setManager, setManager, setProject, setSetBeans, setSrcMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, log, log, setDescription, setLocation
- 
Constructor Details- 
ScriptMapperpublic ScriptMapper()
 
- 
- 
Method Details- 
setFromSets the from part of the transformation rule.- Specified by:
- setFromin interface- FileNameMapper
- Parameters:
- from- a string.
 
- 
setToSets the to part of the transformation rule.- Specified by:
- setToin interface- FileNameMapper
- Parameters:
- to- a string.
 
- 
clearpublic void clear()Reset the list of files
- 
addMappedNameAdd a mapped name- Parameters:
- mapping- the value to use.
 
- 
mapFileNameReturns an array containing the target filename(s) for the given source file.if the given rule doesn't apply to the source file, implementation must return null. SourceFileScanner will then omit the source file in question. - Specified by:
- mapFileNamein interface- FileNameMapper
- Parameters:
- sourceFileName- the name of the source file relative to some given basedirectory.
- Returns:
- an array of strings if the rule applies to the source file, or null if it does not.
 
 
-