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 class DataConfiguration.DataConversionHandler extends DefaultConversionHandler
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.
  • Constructor Details

    • DataConversionHandler

      private DataConversionHandler()
  • Method Details

    • getDateFormat

      public 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 class DefaultConversionHandler
      Returns:
      the date format