public final class Messages
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.ConcurrentMap<java.lang.String,java.text.MessageFormat> |
messageMap
Map from message code to MessageFormat object for the message.
|
private static java.util.ResourceBundle |
RESOURCES |
Modifier | Constructor and Description |
---|---|
private |
Messages() |
Modifier and Type | Method and Description |
---|---|
private static java.text.MessageFormat |
findMessage(java.lang.String code)
Locates a message by its code.
|
static java.lang.String |
getString(java.lang.String code)
Formats a message.
|
static java.lang.String |
getString(java.lang.String code,
java.lang.Object... params)
Formats a message.
|
static java.lang.String |
getString(java.lang.String code,
java.lang.Object param)
Deprecated.
Will be removed in 3.0 in favor of
getString(String, Object[]) When removed, calls to this
method will automatically recompile to getString(String, Object[]) |
private static java.util.concurrent.ConcurrentMap<java.lang.String,java.text.MessageFormat> messageMap
private static final java.util.ResourceBundle RESOURCES
public static java.lang.String getString(java.lang.String code)
code
- The message code.@Deprecated public static java.lang.String getString(java.lang.String code, java.lang.Object param)
getString(String, Object[])
When removed, calls to this
method will automatically recompile to getString(String, Object[])
code
- The message code.param
- The message parameter.public static java.lang.String getString(java.lang.String code, java.lang.Object... params)
code
- The message code.params
- The message parameters.private static java.text.MessageFormat findMessage(java.lang.String code) throws java.util.MissingResourceException
java.util.MissingResourceException