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 Object implements FileNameMapper
A FileNameMapper that contains other FileNameMappers.
See Also:
  • Constructor Details

    • ContainerMapper

      public ContainerMapper()
  • Method Details

    • addConfiguredMapper

      public void addConfiguredMapper(Mapper mapper)
      Add a Mapper.
      Parameters:
      mapper - the Mapper 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 - a FileNameMapper.
    • add

      public void add(FileNameMapper fileNameMapper)
      Add a FileNameMapper.
      Parameters:
      fileNameMapper - a FileNameMapper.
      Throws:
      IllegalArgumentException - if attempting to add this ContainerMapper to itself, or if the specified FileNameMapper is itself a ContainerMapper that contains this ContainerMapper.
    • contains

      protected boolean contains(FileNameMapper fileNameMapper)
      Return true if this ContainerMapper or any of its sub-elements contains the specified FileNameMapper.
      Parameters:
      fileNameMapper - the FileNameMapper to search for.
      Returns:
      boolean.
    • getMappers

      public List<FileNameMapper> getMappers()
      Get the List of FileNameMappers.
      Returns:
      List.
    • setFrom

      public void setFrom(String ignore)
      Empty implementation.
      Specified by:
      setFrom in interface FileNameMapper
      Parameters:
      ignore - ignored.
    • setTo

      public void setTo(String ignore)
      Empty implementation.
      Specified by:
      setTo in interface FileNameMapper
      Parameters:
      ignore - ignored.