Class FlatFileNameMapper
- java.lang.Object
-
- org.apache.maven.shared.model.fileset.mappers.FlatFileNameMapper
-
- All Implemented Interfaces:
FileNameMapper
public class FlatFileNameMapper extends java.lang.Object implements FileNameMapper
Implementation of FileNameMapper that always returns the source file name without any leading directory information.This is the default FileNameMapper for the copy and move tasks if the flatten attribute has been set.
-
-
Constructor Summary
Constructors Constructor Description FlatFileNameMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringmapFileName(java.lang.String sourceFileName)Returns the target filename for the given source file.voidsetFrom(java.lang.String from)Sets the from part of the transformation rule.voidsetTo(java.lang.String to)Sets the to part of the transformation rule.
-
-
-
Method Detail
-
setFrom
public void setFrom(java.lang.String from)
Description copied from interface:FileNameMapperSets the from part of the transformation rule.- Specified by:
setFromin interfaceFileNameMapper- Parameters:
from- the source
-
setTo
public void setTo(java.lang.String to)
Description copied from interface:FileNameMapperSets the to part of the transformation rule.- Specified by:
setToin interfaceFileNameMapper- Parameters:
to- the destination
-
mapFileName
public java.lang.String mapFileName(java.lang.String sourceFileName)
Description copied from interface:FileNameMapperReturns the target filename for the given source file.If the given rule doesn't apply to the source file, the implementation must return null. SourceFileScanner will then omit the source file in question.
- Specified by:
mapFileNamein interfaceFileNameMapper- Parameters:
sourceFileName- the name of the source file relative to some given base directory- Returns:
- the target filename for the given source file
-
-