public class CLocMessageConveyor extends Object implements ch.qos.cal10n.IMessageConveyor
IMessageConveyor based on resource
bundles.
See also getMessage(Enum, Object...) for details.
| Modifier and Type | Class and Description |
|---|---|
static class |
CLocMessageConveyor.ConfigurationLocale |
static class |
CLocMessageConveyor.LocaleProvider |
static class |
CLocMessageConveyor.SimpleLocaleProvider |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,ch.qos.cal10n.util.CAL10NResourceBundle> |
cache |
protected org.cthul.strings.format.FormatterConfiguration |
conf |
protected Locale |
lastLocale |
protected CLocMessageConveyor.LocaleProvider |
localeProvider |
| Constructor and Description |
|---|
CLocMessageConveyor(CLocMessageConveyor.LocaleProvider localeProvider) |
CLocMessageConveyor(CLocMessageConveyor.LocaleProvider localeProvider,
org.cthul.strings.format.FormatterConfiguration conf) |
CLocMessageConveyor(org.cthul.strings.format.FormatterConfiguration conf) |
CLocMessageConveyor(Locale locale)
The
Locale associated with this instance. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
format(String message,
Object[] args) |
<E extends Enum<?>> |
getMessage(E key,
Object... args)
Given an enum as key, find the corresponding resource bundle and return
the corresponding internationalized.
|
String |
getMessage(ch.qos.cal10n.MessageParameterObj mpo) |
protected <E extends Enum<?>> |
lookup(E key) |
protected final CLocMessageConveyor.LocaleProvider localeProvider
protected Locale lastLocale
protected final org.cthul.strings.format.FormatterConfiguration conf
public CLocMessageConveyor(Locale locale)
Locale associated with this instance.locale - public CLocMessageConveyor(CLocMessageConveyor.LocaleProvider localeProvider)
public CLocMessageConveyor(org.cthul.strings.format.FormatterConfiguration conf)
public CLocMessageConveyor(CLocMessageConveyor.LocaleProvider localeProvider, org.cthul.strings.format.FormatterConfiguration conf)
public <E extends Enum<?>> String getMessage(E key, Object... args) throws ch.qos.cal10n.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 ch.qos.cal10n.IMessageConveyorkey - an enum instance used as message keych.qos.cal10n.MessageConveyorExceptionprotected <E extends Enum<?>> ch.qos.cal10n.util.CAL10NResourceBundle lookup(E key) throws ch.qos.cal10n.MessageConveyorException
ch.qos.cal10n.MessageConveyorExceptionpublic String getMessage(ch.qos.cal10n.MessageParameterObj mpo) throws ch.qos.cal10n.MessageConveyorException
getMessage in interface ch.qos.cal10n.IMessageConveyorch.qos.cal10n.MessageConveyorExceptionCopyright © 2013. All Rights Reserved.