|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocal.tomas.i18n.Messages
public abstract class Messages
Base class for internationalized message containers.
| Constructor Summary | |
|---|---|
protected |
Messages(Class<? extends Messages> messagesClass)
Construct container from message container class. |
protected |
Messages(String bundleName)
Construct container from message bundle name. |
| Method Summary | |
|---|---|
String |
format(Locale locale,
String key,
Object o1)
Format internationalized message with a single argument. |
String |
format(Locale locale,
String key,
Object[] args)
Format internationalized message with a list of arguments. |
String |
format(Locale locale,
String key,
Object o1,
Object o2)
Format internationalized message with two arguments. |
String |
format(Locale locale,
String key,
Object o1,
Object o2,
Object o3)
Format internationalized message with three arguments. |
Locale[] |
getAvailableLocales()
Get available locales for this container. |
static Messages |
getInstance(Class<? extends Messages> msgClass)
Get singleton instance. |
String |
getString(Locale locale,
String key)
Get localized string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Messages(String bundleName)
bundleName - message bundle nameprotected Messages(Class<? extends Messages> messagesClass)
messagesClass - message container class| Method Detail |
|---|
public static Messages getInstance(Class<? extends Messages> msgClass)
msgClass - message container class
public String getString(Locale locale,
String key)
locale - locale to usekey - key of string in bundle
public String format(Locale locale,
String key,
Object[] args)
locale - locale to usekey - key of message in bundleargs - message arguments
public String format(Locale locale,
String key,
Object o1)
locale - locale to usekey - key of message in bundleo1 - message argument
public String format(Locale locale,
String key,
Object o1,
Object o2)
locale - locale to usekey - key of message in bundleo1 - first message argumento2 - second message argument
public String format(Locale locale,
String key,
Object o1,
Object o2,
Object o3)
locale - locale to usekey - key of message in bundleo1 - first message argumento2 - second message argumento3 - third message argument
public Locale[] getAvailableLocales()
|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||