Top Description Fields Constructors Methods
org.apache.tools.ant.types.optional

public Class ScriptMapper

extends AbstractScriptComponent
implements FileNameMapper
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.util.FileNameMapper
Imports
java.util.ArrayList, org.apache.tools.ant.util.FileNameMapper

Script support at map time.
Since
Ant1.7

Field Summary

Modifier and TypeField and Description
private ArrayList<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addMappedName(String
the value to use.
mapping
)

Add a mapped name

public void
clear()

Reset the list of files

public String[]

Returns:

an array of strings if the rule applies to the source file, or null if it does not.
mapFileName
(String
the name of the source file relative to some given basedirectory.
sourceFileName
)

Implements org.apache.tools.ant.util.FileNameMapper.mapFileName.

Returns an array containing the target filename(s) for the given source file.
public void
setFrom(String
a string.
from
)

Implements org.apache.tools.ant.util.FileNameMapper.setFrom.

Sets the from part of the transformation rule.
public void
setTo(String
a string.
to
)

Implements org.apache.tools.ant.util.FileNameMapper.setTo.

Sets the to part of the transformation rule.
Inherited from org.apache.tools.ant.types.optional.AbstractScriptComponent:
addTextcreateClasspathexecuteScriptgetRunnerinitScriptRunnersetClasspathsetClasspathRefsetEncodingsetLanguagesetManagersetManagersetProjectsetSetBeanssetSrc

Field Detail

filesback to summary
private ArrayList<String> files

Constructor Detail

ScriptMapperback to summary
public ScriptMapper()

Method Detail

addMappedNameback to summary
public void addMappedName(String mapping)

Add a mapped name

Parameters
mapping:String

the value to use.

clearback to summary
public void clear()

Reset the list of files

mapFileNameback to summary
public String[] mapFileName(String sourceFileName)

Implements org.apache.tools.ant.util.FileNameMapper.mapFileName.

Returns 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.

Parameters
sourceFileName:String

the name of the source file relative to some given basedirectory.

Returns:String[]

an array of strings if the rule applies to the source file, or null if it does not.

Annotations
@Override
setFromback to summary
public void setFrom(String from)

Implements org.apache.tools.ant.util.FileNameMapper.setFrom.

Sets the from part of the transformation rule.

Parameters
from:String

a string.

Annotations
@Override
setToback to summary
public void setTo(String to)

Implements org.apache.tools.ant.util.FileNameMapper.setTo.

Sets the to part of the transformation rule.

Parameters
to:String

a string.

Annotations
@Override