ch.qos.cal10n
Class MessageConveyor

java.lang.Object
  extended by ch.qos.cal10n.MessageConveyor
All Implemented Interfaces:
IMessageConveyor

public class MessageConveyor
extends Object
implements IMessageConveyor

The default implementation for IMessageConveyor based on resource bundles.

See also getMessage(Enum, Object...) for details.

Author:
Ceki Gülcü

Constructor Summary
MessageConveyor(Locale locale)
          The Locale associated with this instance.
 
Method Summary
<E extends Enum<?>>
String
getMessage(E e, Object... args)
          Given an enum e, find the corresponding resource bundle and return the internationalized message defined by the message code 'e'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageConveyor

public MessageConveyor(Locale locale)
The Locale associated with this instance.

Parameters:
locale -
Method Detail

getMessage

public <E extends Enum<?>> String getMessage(E e,
                                             Object... args)
Given an enum e, find the corresponding resource bundle and return the internationalized message defined by the message code 'e'.

The name of the resource bundle is defined via the ResourceBundleName annotation whereas the locale was specified in this MessageConveyor instance's constructor.

Specified by:
getMessage in interface IMessageConveyor
Type Parameters:
E - an enum type
Parameters:
e - an enum instance used as message code
args - optional arguments
Returns:


Copyright © 2009 QOS.ch. All Rights Reserved.