org.codehaus.plexus.components.io.filemappers
Class PrefixFileMapper

java.lang.Object
  extended byorg.codehaus.plexus.components.io.filemappers.IdentityMapper
      extended byorg.codehaus.plexus.components.io.filemappers.PrefixFileMapper
All Implemented Interfaces:
FileMapper

public class PrefixFileMapper
extends IdentityMapper

A file mapper, which maps by adding a prefix.


Field Summary
static java.lang.String ROLE_HINT
          The merge mappers role-hint: "prefix".
 
Fields inherited from interface org.codehaus.plexus.components.io.filemappers.FileMapper
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
PrefixFileMapper()
           
 
Method Summary
 java.lang.String getMappedFileName(java.lang.String name)
          Maps the given source name to a target name.
static java.lang.String getMappedFileName(java.lang.String prefix, java.lang.String name)
          Performs the mapping of a file name by adding a prefix.
 java.lang.String getPrefix()
          Returns the prefix to add.
 void setPrefix(java.lang.String prefix)
          Sets the prefix to add.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_HINT

public static final java.lang.String ROLE_HINT
The merge mappers role-hint: "prefix".

See Also:
Constant Field Values
Constructor Detail

PrefixFileMapper

public PrefixFileMapper()
Method Detail

getMappedFileName

public java.lang.String getMappedFileName(java.lang.String name)
Description copied from interface: FileMapper
Maps the given source name to a target name.

Specified by:
getMappedFileName in interface FileMapper
Overrides:
getMappedFileName in class IdentityMapper

getPrefix

public java.lang.String getPrefix()
Returns the prefix to add.


setPrefix

public void setPrefix(java.lang.String prefix)
Sets the prefix to add.


getMappedFileName

public static java.lang.String getMappedFileName(java.lang.String prefix,
                                                 java.lang.String name)
Performs the mapping of a file name by adding a prefix.



Copyright © 2001-2009 Codehaus. All Rights Reserved.