public final class Messages
extends java.lang.Object
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.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
RESOURCE_NAME |
The name of the resource holding all the messages in the English
language.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
public static final java.lang.String RESOURCE_NAME
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 argumentpublic 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 argumentpublic 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 argumentpublic static java.lang.String format(java.lang.String message, java.lang.Object[] args)
message
- The message nameargs
- Argument listpublic static java.lang.String message(java.lang.String message)
message
- The message nameIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com