Class RegExpFileMapper
- java.lang.Object
-
- org.codehaus.plexus.components.io.filemappers.AbstractFileMapper
-
- org.codehaus.plexus.components.io.filemappers.RegExpFileMapper
-
- All Implemented Interfaces:
FileMapper
@Named("regexp") public class RegExpFileMapper extends AbstractFileMapperImplementation of a file mapper, which uses regular expressions.
-
-
Constructor Summary
Constructors Constructor Description RegExpFileMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMappedFileName(String pName)Checks the input and returns it without modifications.StringgetPattern()Returns the regular expression pattern.booleangetReplaceAll()Returns, whether to replace the first occurrence of the pattern (default), or all.StringgetReplacement()Returns the replacement string.voidsetPattern(String pPattern)Sets the regular expression pattern.voidsetReplaceAll(boolean pReplaceAll)Sets, whether to replace the first occurrence of the pattern (default), or all.voidsetReplacement(String pReplacement)Sets the replacement string.
-
-
-
Field Detail
-
ROLE_HINT
public static final String ROLE_HINT
The regexp mappers role-hint: "regexp".- See Also:
- Constant Field Values
-
-
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 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
@Nonnull public String getMappedFileName(@Nonnull String pName)
Description copied from class:AbstractFileMapperChecks the input and returns it without modifications.- Specified by:
getMappedFileNamein interfaceFileMapper- Overrides:
getMappedFileNamein classAbstractFileMapper- Parameters:
pName- The source name.- Returns:
- The target name.
-
-