|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.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. * * @author Assaf Arkin * @version $Revision: 1.2 $ $Date: 2005/03/05 13:41:57 $
Nested Class Summary | |
(package private) static class |
Messages.EmptyResourceBundle
|
Field Summary | |
static java.lang.String |
ResourceName
The name of the resource holding all the messages in the English * language. |
Constructor Summary | |
Messages()
|
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 |
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 ResourceName
Constructor Detail |
public Messages()
Method Detail |
public static java.lang.String format(java.lang.String message, java.lang.Object arg1)
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
public static void setLocale(java.util.Locale locale)
locale
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |