public final class MessageUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static MessageUtil |
createMessageUtil(Bundle b,
String baseName)
This method loads the resource bundle backing the MessageUtil from the provided Bundle.
|
static MessageUtil |
createMessageUtil(Class<?> context,
String baseName)
Loads the MessageUtil using the given context.
|
static MessageUtil |
createMessageUtil(String baseName)
This method uses the Bundle associated with the caller of this method.
|
String |
getMessage(String key,
Object... inserts)
This method translates the message and puts the inserts into the message before returning it.
|
public String getMessage(String key, Object... inserts)
key - the message key.inserts - the inserts into the resolved message.public static MessageUtil createMessageUtil(Class<?> context, String baseName)
context - the bundle this class is in will be used to resolve the base name.baseName - the resource bundle base nameMissingResourceException - If the resource bundle cannot be locatedpublic static MessageUtil createMessageUtil(String baseName)
baseName - the resource bundle base nameMissingResourceException - If the resource bundle cannot be locatedpublic static MessageUtil createMessageUtil(Bundle b, String baseName)
b - the bundle to load the resource bundle frombaseName - the resource bundle base nameMissingResourceException - If the resource bundle cannot be locatedCopyright © 2010 - 2020 Adobe. All Rights Reserved