Class FileExtensionMapper
- java.lang.Object
-
- org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
-
- org.codehaus.plexus.components.io.filemappers.FileExtensionMapper
-
- All Implemented Interfaces:
FileMapper
@Named("fileExtension") public class FileExtensionMapper extends AbstractFileMapper
An implementation ofFileMapper
, which changes the files extension.
-
-
Constructor Summary
Constructors Constructor Description FileExtensionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMappedFileName(String pName)
Checks the input and returns it without modifications.String
getTargetExtension()
Returns the target files extension.void
setTargetExtension(String pTargetExtension)
Sets the target files extension.
-
-
-
Field Detail
-
ROLE_HINT
public static final String ROLE_HINT
The file extension mappers role-hint: "fileExtension".- See Also:
- Constant Field Values
-
-
Method Detail
-
setTargetExtension
public void setTargetExtension(String pTargetExtension)
Sets the target files extension.- Parameters:
pTargetExtension
- the target extensions- Throws:
IllegalArgumentException
- The target extension is null or empty.
-
getTargetExtension
public String getTargetExtension()
Returns the target files extension.- Returns:
- The target extension
-
getMappedFileName
@Nonnull public String getMappedFileName(@Nonnull String pName)
Description copied from class:AbstractFileMapper
Checks the input and returns it without modifications.- Specified by:
getMappedFileName
in interfaceFileMapper
- Overrides:
getMappedFileName
in classAbstractFileMapper
- Parameters:
pName
- The source name.- Returns:
- The target name.
-
-