Class CommonsInterpolator

  • All Implemented Interfaces:
    Interpolator

    public class CommonsInterpolator
    extends Object
    implements Interpolator
    Commons-Config interpolation wrapper. This implementation uses a ConfigurationInterpolator with the default lookup: sys (system properties), env (environment variables>, and const (constants).
    lookup example value
    sys ${sys:os.name} mac os x
    env ${env:EDITOR} vi
    const ${const:java.awt.event.KeyEvent.VK_ENTER} \n
    Since:
    1.4
    See Also:
    ConfigurationInterpolator
    • Constructor Detail

      • CommonsInterpolator

        public CommonsInterpolator()
    • Method Detail

      • interpolate

        public String interpolate​(String value)
        Description copied from interface: Interpolator
        Interpolates value and returns the result.
        Specified by:
        interpolate in interface Interpolator
        Parameters:
        value - the source text
        Returns:
        the String result of the interpolation, or value, if there was not change.
      • getConfigurationInterpolator

        public org.apache.commons.configuration2.interpol.ConfigurationInterpolator getConfigurationInterpolator()