Class RegexBasedInterpolator

java.lang.Object
org.codehaus.plexus.interpolation.RegexBasedInterpolator
All Implemented Interfaces:
BasicInterpolator, Interpolator

public class RegexBasedInterpolator extends Object implements Interpolator
Expansion of the original RegexBasedInterpolator, found in plexus-utils, this interpolator provides options for setting custom prefix/suffix regex parts, and includes a RecursionInterceptor parameter in its interpolate(..) call, to allow the detection of cyclical expression references.
  • Field Details

  • Constructor Details

    • RegexBasedInterpolator

      public RegexBasedInterpolator()
      Setup a basic interpolator.

      NOTE: You will have to call

      addValueSource(ValueSource) at least once if you use this constructor!
    • RegexBasedInterpolator

      public RegexBasedInterpolator(boolean reusePatterns)
      Parameters:
      reusePatterns - already compiled patterns will be reused
    • RegexBasedInterpolator

      public 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.

      NOTE: You will have to call addValueSource(ValueSource) at least once if you use this constructor!

      Parameters:
      startRegex - start of the regular expression to use
      endRegex - end of the regular expression to use
    • RegexBasedInterpolator

      public RegexBasedInterpolator(List valueSources)
      Setup a basic interpolator with the specified list of value sources.
      Parameters:
      valueSources - The list of value sources to use
    • RegexBasedInterpolator

      public 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.
      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
  • Method Details