Class DataConfiguration.DataConversionHandler
- java.lang.Object
-
- org.apache.commons.configuration2.convert.DefaultConversionHandler
-
- org.apache.commons.configuration2.DataConfiguration.DataConversionHandler
-
- All Implemented Interfaces:
ConversionHandler
- Enclosing class:
- DataConfiguration
private final class DataConfiguration.DataConversionHandler extends DefaultConversionHandler
A specializedConversionHandler
implementation which allows overriding the date format pattern. This class takes care that the format pattern can be defined as a property of the wrapped configuration or temporarily passed when calling a conversion method.
-
-
Field Summary
-
Fields inherited from class org.apache.commons.configuration2.convert.DefaultConversionHandler
DEFAULT_DATE_FORMAT, INSTANCE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DataConversionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDateFormat()
Gets the date format used by this conversion handler.-
Methods inherited from class org.apache.commons.configuration2.convert.DefaultConversionHandler
convert, convertValue, extractConversionValue, extractValues, extractValues, getListDelimiterHandler, isComplexObject, isEmptyElement, setDateFormat, setListDelimiterHandler, to, toArray, toCollection
-
-
-
-
Method Detail
-
getDateFormat
public java.lang.String getDateFormat()
Gets the date format used by this conversion handler. This implementation checks for a defined data format in the following order:- If a temporary date format is set for the current call, it is used.
- If a date format is specified in this configuration using the
DATE_FORMAT_KEY
property, it is used. - Otherwise, the date format set for the original conversion handler is used if available.
- Overrides:
getDateFormat
in classDefaultConversionHandler
- Returns:
- the date format
-
-