public interface MessageInterpolator extends Serializable, DeltaSpikeConfig
Implementations are responsible to replace placeholders in a message with the final value.
An application can provide an own implementation as @Alternative.
A simple implementation which uses the
String.format(java.util.Locale, String, Object...)
will be used by default.
| Modifier and Type | Method and Description |
|---|---|
String |
interpolate(String messageText,
Serializable[] arguments,
Locale locale)
replaces the arguments of the given message with the given arguments
instead of a MessageContextAware interface. we need it to avoid expensive operations like locking or deep cloning
|
String interpolate(String messageText, Serializable[] arguments, Locale locale)
messageText - the message text which has to be interpolatedarguments - a list of numbered and/or named arguments for the current messagelocale - to use for the formattingCopyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.