org.codehaus.plexus.interpolation
public class RegexBasedInterpolator extends Object implements Interpolator
Version: $Id: RegexBasedInterpolator.java 7826 2008-11-14 16:21:07Z olamy $
Field Summary | |
---|---|
static String | DEFAULT_REGEXP |
Constructor Summary | |
---|---|
RegexBasedInterpolator()
Setup a basic interpolator.
| |
RegexBasedInterpolator(boolean reusePatterns) | |
RegexBasedInterpolator(String startRegex, String endRegex)
Setup an interpolator with no value sources, and the specified regex pattern
prefix and suffix in place of the default one.
| |
RegexBasedInterpolator(List valueSources)
Setup a basic interpolator with the specified list of value sources.
| |
RegexBasedInterpolator(String startRegex, String endRegex, List valueSources)
Setup an interpolator with the specified value sources, and the specified
regex pattern prefix and suffix in place of the default one.
|
Method Summary | |
---|---|
void | addPostProcessor(InterpolationPostProcessor postProcessor) |
void | addValueSource(ValueSource valueSource) |
void | clearAnswers() |
void | clearFeedback()
Clear the feedback messages from previous interpolate(..) calls. |
List | getFeedback()
Return any feedback messages and errors that were generated - but
suppressed - during the interpolation process. |
String | interpolate(String input, String thisPrefixPattern, RecursionInterceptor recursionInterceptor)
Attempt to resolve all expressions in the given input string, using the
given pattern to first trim an optional prefix from each expression. |
String | interpolate(String input, String thisPrefixPattern) |
String | interpolate(String input) |
String | interpolate(String input, RecursionInterceptor recursionInterceptor) |
boolean | isCacheAnswers() |
boolean | isReusePatterns() |
void | removePostProcessor(InterpolationPostProcessor postProcessor) |
void | removeValuesSource(ValueSource valueSource) |
void | setCacheAnswers(boolean cacheAnswers) |
void | setReusePatterns(boolean reusePatterns) |
Parameters: reusePatterns already compiled patterns will be reused
Parameters: startRegex start of the regular expression to use endRegex end of the regular expression to use
Parameters: valueSources The list of value sources to use
Parameters: startRegex start of the regular expression to use endRegex end of the regular expression to use valueSources The list of value sources to use
Returns: a List that may be interspersed with String and Throwable instances.
Parameters: input The input string to interpolate thisPrefixPattern An optional pattern that should be trimmed from the start of any expressions found in the input. recursionInterceptor Used to protect the interpolation process from expression cycles, and throw an exception if one is detected.
Parameters: input The input string to interpolate thisPrefixPattern An optional pattern that should be trimmed from the start of any expressions found in the input.
Parameters: input The input string to interpolate
Parameters: input The input string to interpolate recursionInterceptor Used to protect the interpolation process from expression cycles, and throw an exception if one is detected.