|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.castor.util.Messages
I18N message formatting class. A static factory for obtaining messages and formatting messages with arguments.
The resource file org.exolab.castor.util.resources.messages contains a list of all the messages in English. Additional resource files can be added for other languages and locales by placing them in the same package with a language/locale prefix. See the I18N documentation and use of resource bundles in the JDK docs.
| Field Summary | |
static java.lang.String |
RESOURCE_NAME
The name of the resource holding all the messages in the English language. |
| Method Summary | |
static java.lang.String |
format(java.lang.String message,
java.lang.Object arg1)
Format the named message using a single argument and return the full message text. |
static java.lang.String |
format(java.lang.String message,
java.lang.Object[] args)
Format the named message using any number of arguments and return the full message text. |
static java.lang.String |
format(java.lang.String message,
java.lang.Object arg1,
java.lang.Object arg2)
Format the named message using two argument and return the full message text. |
static java.lang.String |
format(java.lang.String message,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Format the named message using three argument and return the full message text. |
static java.lang.String |
message(java.lang.String message)
Return the text of the named message without formatting. |
static void |
setDefaultLocale()
Set the default locale to use for loading messages. |
static void |
setLocale(java.util.Locale locale)
Set the locale to use for loading messages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String RESOURCE_NAME
| Method Detail |
public static void setDefaultLocale()
public static void setLocale(java.util.Locale locale)
locale - the locale for which a resource bundle is desired.
public static java.lang.String format(java.lang.String message,
java.lang.Object arg1)
message - The message namearg1 - The first argument
public static java.lang.String format(java.lang.String message,
java.lang.Object arg1,
java.lang.Object arg2)
message - The message namearg1 - The first argumentarg2 - The second argument
public static java.lang.String format(java.lang.String message,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
message - The message namearg1 - The first argumentarg2 - The second argumentarg3 - The third argument
public static java.lang.String format(java.lang.String message,
java.lang.Object[] args)
message - The message nameargs - Argument list
public static java.lang.String message(java.lang.String message)
message - The message name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||