public class MessageFormatter extends Object
Constructor and Description |
---|
MessageFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
formatMessage(Locale locale,
String key,
Object[] args,
String[] bundleNames)
The specified key is used to retrieve an unformatted message from a
resource bundle localized for the specified locale.
|
public String formatMessage(Locale locale, String key, Object[] args, String[] bundleNames)
locale
- the required localekey
- the message keyargs
- message parameter valuesNullPointerException
- if key is nullMissingResourceException
- if a resource bundle or the specified key cannot be foundClassCastException
- if the object found for the specified key is not a stringIllegalArgumentException
- if the args don't match the message.Copyright © 2005–2014 Apache Software Foundation. All rights reserved.