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

java.lang.Object
  extended by org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
      extended by org.codehaus.plexus.components.io.filemappers.RegExpFileMapper
All Implemented Interfaces:
FileMapper

public class RegExpFileMapper
extends AbstractFileMapper

Implementation of a file mapper, which uses regular expressions.


Field Summary
static String ROLE_HINT
          The regexp mappers role-hint: "regexp".
 
Fields inherited from interface org.codehaus.plexus.components.io.filemappers.FileMapper
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
RegExpFileMapper()
           
 
Method Summary
 String getMappedFileName(String pName)
          Checks the input and returns it without modifications.
 String getPattern()
          Returns the regular expression pattern.
 boolean getReplaceAll()
          Returns, whether to replace the first occurrency of the pattern (default), or all.
 String getReplacement()
          Returns the replacement string.
 void setPattern(String pPattern)
          Sets the regular expression pattern.
 void setReplaceAll(boolean pReplaceAll)
          Sets, whether to replace the first occurrency of the pattern (default), or all.
 void setReplacement(String pReplacement)
          Sets the replacement string.
 
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 String ROLE_HINT
The regexp mappers role-hint: "regexp".

See Also:
Constant Field Values
Constructor Detail

RegExpFileMapper

public RegExpFileMapper()
Method Detail

setPattern

public void setPattern(String pPattern)
Sets the regular expression pattern.


getPattern

public String getPattern()
Returns the regular expression pattern.


setReplacement

public void setReplacement(String pReplacement)
Sets the replacement string.


getReplacement

public String getReplacement()
Returns the replacement string.


getReplaceAll

public boolean getReplaceAll()
Returns, whether to replace the first occurrency of the pattern (default), or all.


setReplaceAll

public void setReplaceAll(boolean pReplaceAll)
Sets, whether to replace the first occurrency of the pattern (default), or all.


getMappedFileName

public String getMappedFileName(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-2012 Codehaus. All Rights Reserved.