Class RegExpFileMapper
java.lang.Object
org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
org.codehaus.plexus.components.io.filemappers.RegExpFileMapper
- All Implemented Interfaces:
FileMapper
Implementation of a file mapper, which uses regular expressions.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetMappedFileName
(String pName) Checks the input and returns it without modifications.Returns the regular expression pattern.boolean
Returns, whether to replace the first occurrence of the pattern (default), or all.Returns the replacement string.void
setPattern
(String pPattern) Sets the regular expression pattern.void
setReplaceAll
(boolean pReplaceAll) Sets, whether to replace the first occurrence of the pattern (default), or all.void
setReplacement
(String pReplacement) Sets the replacement string.
-
Field Details
-
ROLE_HINT
The regexp mappers role-hint: "regexp".- See Also:
-
-
Constructor Details
-
RegExpFileMapper
public RegExpFileMapper()
-
-
Method Details
-
setPattern
Sets the regular expression pattern. -
getPattern
Returns the regular expression pattern. -
setReplacement
Sets the replacement string. -
getReplacement
Returns the replacement string. -
getReplaceAll
public boolean getReplaceAll()Returns, whether to replace the first occurrence of the pattern (default), or all. -
setReplaceAll
public void setReplaceAll(boolean pReplaceAll) Sets, whether to replace the first occurrence of the pattern (default), or all. -
getMappedFileName
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.
-