|
Compiler assisted localization library (CAL10N) - API 0.7.3-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.cal10n.MessageConveyor
public class MessageConveyor
The default implementation for IMessageConveyor
based on resource
bundles.
See also getMessage(Enum, Object...)
for details.
Constructor Summary | |
---|---|
MessageConveyor(Locale locale)
The Locale associated with this instance. |
Method Summary | ||
---|---|---|
|
getMessage(E key,
Object... args)
Given an enum as key, find the corresponding resource bundle and return the corresponding internationalized. |
|
String |
getMessage(MessageParameterObj mpo)
Syntactic sugar for the case where the massage is contained in a MessageParameterObj . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageConveyor(Locale locale)
Locale
associated with this instance.
locale
- Method Detail |
---|
public <E extends Enum<?>> String getMessage(E key, Object... args) throws MessageConveyorException
The name of the resource bundle is defined via the BaseName
annotation whereas the locale is specified in this MessageConveyor
instance's constructor.
getMessage
in interface IMessageConveyor
E
- an enum typekey
- an enum instance used as message keyargs
- optional arguments
MessageConveyorException
public String getMessage(MessageParameterObj mpo) throws MessageConveyorException
IMessageConveyor
MessageParameterObj
.
Equivalent to calling
getMessage(mpo.getKey(), mpo.getArgs());
getMessage
in interface IMessageConveyor
mpo
- The MessageParameterObj to translate
MessageConveyorException
IMessageConveyor.getMessage(Enum, Object...)
|
Compiler assisted localization library (CAL10N) - API 0.7.3-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |