Package net.sf.jasperreports.engine.fill
Class MessageFormatWrapper
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.MessageFormatWrapper
-
public class MessageFormatWrapper extends Object
MessageFormat
does not work with classes of the java.time package such asLocalDate
This is by design and won't be fixed: https://bugs.openjdk.org/browse/JDK-8016743 This class wraps aMessageFormat
and converts classes of the java.time package intoDate
objects- Author:
- Guillaume Toison
-
-
Constructor Summary
Constructors Constructor Description MessageFormatWrapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
format(String pattern, Locale locale, Object... arguments)
-
-
-
Method Detail
-
format
public static String format(String pattern, Locale locale, Object... arguments)
- Parameters:
pattern
- The message pattern, for instance "since {0, date, dd-MM-yy}"locale
- The locale, must be non-nullarguments
- the message parameters- Returns:
- the constructed message
- See Also:
MessageFormat.format(java.lang.Object[],java.lang.StringBuffer, java.text.FieldPosition)
-
-