org.codehaus.plexus.components.io.filemappers
Class FileExtensionMapper
java.lang.Object
org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
org.codehaus.plexus.components.io.filemappers.FileExtensionMapper
- All Implemented Interfaces:
- FileMapper
public class FileExtensionMapper
- extends AbstractFileMapper
An implementation of FileMapper
, which changes the files extension.
Field Summary |
static java.lang.String |
ROLE_HINT
The file extension mappers role-hint: "fileExtension". |
Method Summary |
java.lang.String |
getMappedFileName(java.lang.String pName)
Checks the input and returns it without modifications. |
java.lang.String |
getTargetExtension()
Returns the target files extension. |
void |
setTargetExtension(java.lang.String pTargetExtension)
Sets the target files extension. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROLE_HINT
public static final java.lang.String ROLE_HINT
- The file extension mappers role-hint: "fileExtension".
- See Also:
- Constant Field Values
FileExtensionMapper
public FileExtensionMapper()
setTargetExtension
public void setTargetExtension(java.lang.String pTargetExtension)
- Sets the target files extension.
- Parameters:
pTargetExtension
- the target extensions
- Throws:
java.lang.IllegalArgumentException
- The target extension is null or empty.
getTargetExtension
public java.lang.String getTargetExtension()
- Returns the target files extension.
- Returns:
- The target extension
getMappedFileName
public java.lang.String getMappedFileName(java.lang.String pName)
- Description copied from class:
AbstractFileMapper
- Checks the input and returns it without modifications.
- Specified by:
getMappedFileName
in interface FileMapper
- Overrides:
getMappedFileName
in class AbstractFileMapper
- Parameters:
pName
- The source name.
- Returns:
- The target name.
Copyright © 2001-2011 Codehaus. All Rights Reserved.