public abstract class MappedNlsFormatterManager extends AbstractNlsFormatterManager
NlsFormatterManager
interface.Modifier and Type | Field and Description |
---|---|
private NlsFormatterMap |
formatterMap |
NO_COMMA_OR_END_EXPRESSION, NO_EXPRESSION
STYLE_CURRENCY, STYLE_FULL, STYLE_INTEGER, STYLE_ISO_8601, STYLE_LONG, STYLE_MEDIUM, STYLE_PERCENT, STYLE_SHORT, TYPE_CHOICE, TYPE_DATE, TYPE_DATETIME, TYPE_NUMBER, TYPE_TIME, TYPE_TYPE
END_EXPRESSION, FORMAT_SEPARATOR, START_EXPRESSION
Constructor and Description |
---|
MappedNlsFormatterManager()
The constructor.
|
MappedNlsFormatterManager(NlsFormatterMap formatterMap)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
NlsFormatterPlugin<?> |
getFormatter(String formatType,
String formatStyle)
|
protected NlsFormatterMap |
getFormatterMap() |
protected NlsFormatterPlugin<Object> |
getSubFormatter(String formatType,
String subformat)
|
void |
setFormatterMap(NlsFormatterMap formatterMap) |
doInitialize, doInitialized, getFormatter, getFormatter, getInstance, getJustificationBuilder, getSubFormatter, parse, setJustificationBuilder
createLogger, getLogger
getInitializationState, initialize
private NlsFormatterMap formatterMap
getFormatter(String, String)
public MappedNlsFormatterManager()
public MappedNlsFormatterManager(NlsFormatterMap formatterMap)
formatterMap
- is the map with the registered formatters.protected NlsFormatterPlugin<Object> getSubFormatter(String formatType, String subformat)
NlsFormatter
for the given formatType
and the custom subformat
. It
is called if no formatter is registered
for the given arguments. formatType
- is the type to be formatted.subformat
- is the custom formatStyle for which no static formatter is registered.null
if no such formatter is could be created.public NlsFormatterPlugin<?> getFormatter(String formatType, String formatStyle)
NlsFormatterManager
NlsFormatter
for the given formatType
and formatStyle
. MessageFormat
the following types and styles need to be supported by the
implementation: formatType
:
formatStyle
:
short
medium
long
full
integer
currency
percent
ChoiceFormat
s is NOT provided in a compatible way as by hacking internal arrays
of MessageFormat
. Instead this implementation provides a clean configuration via
formatStyle
when formatType
is choice
(see
NlsFormatterChoice
).formatType
- is the type to be formatted.formatStyle
- is the style defining details of formatting.NlsFormatter
instance.MessageFormat
protected NlsFormatterMap getFormatterMap()
@Inject public void setFormatterMap(NlsFormatterMap formatterMap)
formatterMap
- is the formatterMap to setCopyright © 2001–2016 mmm-Team. All rights reserved.