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
A specialized
ConversionHandler
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 -
Method Summary
Modifier and TypeMethodDescriptionGets 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
-
Constructor Details
-
DataConversionHandler
private DataConversionHandler()
-
-
Method Details
-
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
-