public class DisabledListDelimiterHandler extends AbstractListDelimiterHandler
A specialized implementation of the
which disables list splitting.
This class does not recognize any list delimiters; passed in strings are
returned unchanged. Also the
escape() method is a dummy - there is no
need for escaping delimiter characters as none are supported. Note that the
method for escaping a list throws an
If list delimiters are not supported, there is no point in squashing multiple
values into a single one.
Implementation note: An instance of this class can be shared between multiple configuration objects. It is state-less and thread-safe.
|Modifier and Type||Field and Description|
A default instance of this class.
|Constructor and Description|
|Modifier and Type||Method and Description|
Escapes all values in the given list and concatenates them to a single string.
Escapes the specified string.
Actually splits the passed in string which is guaranteed to be not null.
escape, parse, split
public Object escapeList(List<?> values, ValueTransformer transformer)
values- the list with all the values to be converted to a single value
ValueTransformerfor an additional encoding (must not be null)
protected Collection<String> splitString(String s, boolean trim)
split()method. Here the actual splitting logic has to be implemented. This implementation always returns a collection containing the passed in string as its single element. The string is not changed, the
trimflag is ignored. (The
trimflag refers to the components extracted from the string. Because no components are extracted nothing is trimmed.)
protected String escapeString(String s)
escape()if the passed in object is a string. Concrete subclasses have to implement their specific escaping logic here, so that the list delimiters they support are properly escaped. This implementation returns the passed in string without any changes.
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.