|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.imolinfo.jbi4ejb.jbi.Messages
public final class Messages
Class dedicated to the internationalization of application messages.
Method Summary | |
---|---|
static Messages |
getMessages(java.lang.Class clazz)
Factory method to create a Messages object from a
Class . |
static Messages |
getMessages(java.lang.Class clazz,
java.util.Locale locale)
Factory method to create a Messages object from a
Class and a Locale . |
java.lang.String |
getString(java.lang.String key,
java.lang.Object... args)
Retrieves a localized String which may contains parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Messages getMessages(java.lang.Class clazz)
Messages
object from a
Class
.
clazz
- the class used to find the resource bundle. Must not be
null
.
Messages
object related to clazz
,
never null
. The messages bundle used is related to
the default locale.public static Messages getMessages(java.lang.Class clazz, java.util.Locale locale)
Messages
object from a
Class
and a Locale
.
clazz
- the class used to find the resource bundle. Must not be
null
.locale
- the Locale
to find the correct resource
bundle. If null
, the default locale will be
used.
Messages
object related to clazz
and
locale
, never null
.public java.lang.String getString(java.lang.String key, java.lang.Object... args)
String
which may contains parameters.
This method applies a MessageFormat
to the value with the
arguments provided.
key
- the resource key to retrieve the (localized) message.args
- the optional MessageFormat
arguments.
key
after
the substitution of its parameters with values
args
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |