Class IdentityMapper

java.lang.Object
org.apache.tools.ant.util.IdentityMapper
All Implemented Interfaces:
FileNameMapper

public class IdentityMapper extends Object implements FileNameMapper
Implementation of FileNameMapper that always returns the source file name.

This is the default FileNameMapper for the copy and move tasks.

  • Constructor Details

    • IdentityMapper

      public IdentityMapper()
  • Method Details

    • setFrom

      public void setFrom(String from)
      Ignored.
      Specified by:
      setFrom in interface FileNameMapper
      Parameters:
      from - ignored.
    • setTo

      public void setTo(String to)
      Ignored.
      Specified by:
      setTo in interface FileNameMapper
      Parameters:
      to - ignored.
    • mapFileName

      public String[] mapFileName(String sourceFileName)
      Returns an one-element array containing the source file name.
      Specified by:
      mapFileName in interface FileNameMapper
      Parameters:
      sourceFileName - the name to map.
      Returns:
      the source filename in a one-element array.