|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.core.util.Messages
public final class 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 String |
RESOURCE_NAME
The name of the resource holding all the messages in the English language. |
| Method Summary | |
|---|---|
static String |
format(String message,
Object arg1)
Format the named message using a single argument and return the full message text. |
static String |
format(String message,
Object[] args)
Format the named message using any number of arguments and return the full message text. |
static String |
format(String message,
Object arg1,
Object arg2)
Format the named message using two argument and return the full message text. |
static String |
format(String message,
Object arg1,
Object arg2,
Object arg3)
Format the named message using three argument and return the full message text. |
static String |
message(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(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 String RESOURCE_NAME
| Method Detail |
|---|
public static void setDefaultLocale()
public static void setLocale(Locale locale)
locale - the locale for which a resource bundle is desired.
public static String format(String message,
Object arg1)
message - The message namearg1 - The first argument
public static String format(String message,
Object arg1,
Object arg2)
message - The message namearg1 - The first argumentarg2 - The second argument
public static String format(String message,
Object arg1,
Object arg2,
Object arg3)
message - The message namearg1 - The first argumentarg2 - The second argumentarg3 - The third argument
public static String format(String message,
Object[] args)
message - The message nameargs - Argument list
public static String message(String message)
message - The message name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||