org.apache.commons.configuration2.convert

## Interface ValueTransformer

-     public interface ValueTransformer

  Definition of an interface used by `ListDelimiterHandler` to perform additional transformations on behalf of a configuration when a property value is escaped.

  Some `Configuration` implementations require a special encoding of their property values before they get written on disk. In some constellations, e.g. when a property with multiple values is to be forced on a single line, this encoding has to be done together with the escaping of list delimiter characters - which is in the responsibility of `ListDelimiterHandler`.

  In order to allow a proper collaboration between the parties involved, this interface was introduced. A configuration object provides an implementation of `ValueTransformer` and passes it to the `ListDelimiterHandler` when escaping of properties is needed. The delimiter handler can then call back to perform the additional encoding as its pleasure.

  Since:
    2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `transformValue(Object value)` Performs an arbitrary encoding of the passed in value object.

- - ### Method Detail

    - #### transformValue

          Object transformValue(Object value)

      Performs an arbitrary encoding of the passed in value object. This method is called by a `ListDelimiterHandler` implementation before or after list delimiters have been escaped.
      Parameters:
        `value` - the property value to be transformed
      Returns:
        the transformed property value

Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.