|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.taglibs.standard.resources.Resources
public class Resources
Provides locale-neutral access to string resources. Only the documentation and code are in English. :-)
The major goal, aside from globalization, is convenience. Access to resources with no parameters is made in the form:
Resources.getMessage(MESSAGE_NAME);
Access to resources with one parameter works like
Resources.getMessage(MESSAGE_NAME, arg1);
... and so on.
Constructor Summary | |
---|---|
Resources()
|
Method Summary | |
---|---|
static String |
getMessage(String name)
Retrieves a message with no arguments. |
static String |
getMessage(String name,
Object... a)
Retrieves a message with arbitrarily many arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resources()
Method Detail |
---|
public static String getMessage(String name) throws MissingResourceException
name
- the name of the message
MissingResourceException
- if the message does not existpublic static String getMessage(String name, Object... a) throws MissingResourceException
name
- the name of the messagea
- arguments to be substituted into the message text
MissingResourceException
- if the message does not exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |