Class IcuMessageArgConverter

java.lang.Object
de.codecamp.messages.runtime.IcuMessageArgConverter
All Implemented Interfaces:
MessageArgConverter

public class IcuMessageArgConverter extends Object implements MessageArgConverter
Converts several java.time types and Calendar to Calendar.

If changes are made to the mapped types, this must be reflected in de.codecamp.messages.shared.messageformat.IcuMessageFormatSupport.

  • Constructor Details

    • IcuMessageArgConverter

      public IcuMessageArgConverter(Supplier<TimeZone> timeZoneProvider)
  • Method Details

    • convert

      public Object convert(Object value, Locale locale)
      Description copied from interface: MessageArgConverter
      Converts message arguments from a type that is used in the application to a type that can be handled by the used messsage format.
      Specified by:
      convert in interface MessageArgConverter
      Parameters:
      value - the original value
      locale - the locale
      Returns:
      the converted value