Package de.codecamp.messages.runtime
Class DefaultMessageArgConverter
- java.lang.Object
-
- de.codecamp.messages.runtime.DefaultMessageArgConverter
-
- All Implemented Interfaces:
MessageArgConverter
public class DefaultMessageArgConverter extends Object implements MessageArgConverter
Converts several java.time types toDate.MessageFormatunfortunately doesn't understandCalendaror anything else with a time zone.If changes are made to the mapped types, this must be reflected in
de.codecamp.messages.shared.messageformat.DefaultMessageFormatSupport.
-
-
Constructor Summary
Constructors Constructor Description DefaultMessageArgConverter(Supplier<TimeZone> timeZoneProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectconvert(Object value, Locale locale)Converts message arguments from a type that is used in the application to a type that can be handled by the used messsage format.
-
-
-
Method Detail
-
convert
public Object convert(Object value, Locale locale)
Description copied from interface:MessageArgConverterConverts 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:
convertin interfaceMessageArgConverter- Parameters:
value- the original valuelocale- the locale- Returns:
- the converted value
-
-