@Named @Singleton public class NlsFormatterManagerImpl extends MappedNlsFormatterManager
NlsFormatterManager
interface.Modifier and Type | Field and Description |
---|---|
private NlsDependencies |
nlsDependencies |
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 |
---|
NlsFormatterManagerImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
NlsDependencies |
getNlsDependencies() |
protected NlsFormatterPlugin<?> |
getSubFormatter(String formatType,
CharSequenceScanner scanner)
This method is like
NlsFormatterManager.getFormatter(String, String) but reads the
style from the given scanner. |
protected NlsFormatterPlugin<Object> |
getSubFormatter(String formatType,
String subformat)
|
void |
setNlsDependencies(NlsDependencies nlsDependencies)
This method sets the
NlsDependencies to use. |
getFormatter, getFormatterMap, setFormatterMap
doInitialized, getFormatter, getFormatter, getInstance, getJustificationBuilder, parse, setJustificationBuilder
createLogger, getLogger
getInitializationState, initialize
private NlsDependencies nlsDependencies
protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractNlsFormatterManager
protected NlsFormatterPlugin<?> getSubFormatter(String formatType, CharSequenceScanner scanner)
AbstractNlsFormatterManager
NlsFormatterManager.getFormatter(String, String)
but reads the
style
from the given scanner.getSubFormatter
in class AbstractNlsFormatterManager
formatType
- is the type to be formatted.scanner
- is the current CharSequenceScanner
for parsing the style defining details of formatting.NlsFormatter
.protected NlsFormatterPlugin<Object> getSubFormatter(String formatType, String subformat)
MappedNlsFormatterManager
NlsFormatter
for the given formatType
and the custom subformat
. It
is called if no formatter is registered
for the given arguments. getSubFormatter
in class MappedNlsFormatterManager
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 NlsDependencies getNlsDependencies()
@Inject public void setNlsDependencies(NlsDependencies nlsDependencies)
NlsDependencies
to use.nlsDependencies
- are the NlsDependencies
.Copyright © 2001–2016 mmm-Team. All rights reserved.