Package org.apache.tools.ant.util
Class ContainerMapper
- java.lang.Object
-
- org.apache.tools.ant.util.ContainerMapper
-
- All Implemented Interfaces:
FileNameMapper
- Direct Known Subclasses:
ChainedMapper
,CompositeMapper
,FirstMatchMapper
public abstract class ContainerMapper extends java.lang.Object implements FileNameMapper
AFileNameMapper
that contains otherFileNameMapper
s.- See Also:
FileNameMapper
-
-
Constructor Summary
Constructors Constructor Description ContainerMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(FileNameMapper fileNameMapper)
Add aFileNameMapper
.void
addConfigured(FileNameMapper fileNameMapper)
An add configured version of the add method.void
addConfiguredMapper(Mapper mapper)
Add aMapper
.protected boolean
contains(FileNameMapper fileNameMapper)
Returntrue
if thisContainerMapper
or any of its sub-elements contains the specifiedFileNameMapper
.java.util.List<FileNameMapper>
getMappers()
Get theList
ofFileNameMapper
s.void
setFrom(java.lang.String ignore)
Empty implementation.void
setTo(java.lang.String ignore)
Empty implementation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tools.ant.util.FileNameMapper
mapFileName
-
-
-
-
Method Detail
-
addConfiguredMapper
public void addConfiguredMapper(Mapper mapper)
Add aMapper
.- Parameters:
mapper
- theMapper
to add.
-
addConfigured
public void addConfigured(FileNameMapper fileNameMapper)
An add configured version of the add method. This class used to contain an add method and an addConfiguredMapper method. Dur to ordering, the add method was always called first. This addConfigured method has been added to allow chaining to work correctly.- Parameters:
fileNameMapper
- aFileNameMapper
.
-
add
public void add(FileNameMapper fileNameMapper)
Add aFileNameMapper
.- Parameters:
fileNameMapper
- aFileNameMapper
.- Throws:
java.lang.IllegalArgumentException
- if attempting to add thisContainerMapper
to itself, or if the specifiedFileNameMapper
is itself aContainerMapper
that contains thisContainerMapper
.
-
contains
protected boolean contains(FileNameMapper fileNameMapper)
Returntrue
if thisContainerMapper
or any of its sub-elements contains the specifiedFileNameMapper
.- Parameters:
fileNameMapper
- theFileNameMapper
to search for.- Returns:
boolean
.
-
getMappers
public java.util.List<FileNameMapper> getMappers()
Get theList
ofFileNameMapper
s.- Returns:
List
.
-
setFrom
public void setFrom(java.lang.String ignore)
Empty implementation.- Specified by:
setFrom
in interfaceFileNameMapper
- Parameters:
ignore
- ignored.
-
setTo
public void setTo(java.lang.String ignore)
Empty implementation.- Specified by:
setTo
in interfaceFileNameMapper
- Parameters:
ignore
- ignored.
-
-