public abstract class AbstractNlsFormatterManager extends AbstractLoggableComponent implements NlsFormatterManager, NlsArgumentParser
NlsFormatterManager
interface. NlsFormatterManager
interface to gain
compatibility with further releases.Modifier and Type | Field and Description |
---|---|
private static AbstractNlsFormatterManager |
instance |
private JustificationBuilder |
justificationBuilder |
protected static CharFilter |
NO_COMMA_OR_END_EXPRESSION
A char filter that accepts everything except ',' and '}'.
|
protected static CharFilter |
NO_EXPRESSION
A char filter that accepts everything except ',' and '}'.
|
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 |
---|
AbstractNlsFormatterManager()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
protected void |
doInitialized()
This method is invoked at the end of the actual
initialization . |
NlsFormatterPlugin<Object> |
getFormatter()
This method gets the default
NlsFormatter . |
NlsFormatterPlugin<?> |
getFormatter(String formatType)
This method gets the
NlsFormatter for the given formatType . |
static AbstractNlsFormatterManager |
getInstance()
This method gets the singleton instance of this
AbstractNlsFormatterManager . |
protected JustificationBuilder |
getJustificationBuilder()
|
protected NlsFormatterPlugin<?> |
getSubFormatter(String formatType,
CharSequenceScanner scanner)
This method is like
NlsFormatterManager.getFormatter(String, String) but reads the
style from the given scanner. |
NlsArgument |
parse(CharSequenceScanner scanner)
This method parses the
internationalized message given as
CharSequenceScanner pointing the beginning of an argument (immediately after
NlsArgumentParser.START_EXPRESSION ). |
void |
setJustificationBuilder(JustificationBuilder justificationBuilder) |
createLogger, getLogger
getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormatter
protected static final CharFilter NO_COMMA_OR_END_EXPRESSION
protected static final CharFilter NO_EXPRESSION
private static AbstractNlsFormatterManager instance
private JustificationBuilder justificationBuilder
public AbstractNlsFormatterManager()
public static AbstractNlsFormatterManager getInstance()
AbstractNlsFormatterManager
. Cdi.GET_INSTANCE
before using.protected void doInitialized()
AbstractComponent
initialization
. It is called when
AbstractComponent.initialize()
is invoked for the first time after AbstractComponent.doInitialize()
is completed and
initialization-state
has changed to initialized
. super.
AbstractComponent.doInitialized()
.doInitialized
in class AbstractComponent
public NlsArgument parse(CharSequenceScanner scanner)
NlsArgumentParser
internationalized message
given as
CharSequenceScanner
pointing the beginning of an argument (immediately after
NlsArgumentParser.START_EXPRESSION
).parse
in interface NlsArgumentParser
scanner
- is the CharSequenceScanner
.NlsFormatter
instance.NlsFormatterManager.getFormatter(String, String)
protected NlsFormatterPlugin<?> getSubFormatter(String formatType, CharSequenceScanner scanner)
NlsFormatterManager.getFormatter(String, String)
but reads the
style
from the given scanner.formatType
- is the type to be formatted.scanner
- is the current CharSequenceScanner
for parsing the style defining details of formatting.NlsFormatter
.protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractLoggableComponent
protected JustificationBuilder getJustificationBuilder()
JustificationBuilder
.@Inject public void setJustificationBuilder(JustificationBuilder justificationBuilder)
justificationBuilder
- is the justificationBuilder to setpublic NlsFormatterPlugin<Object> getFormatter()
NlsFormatterManager
NlsFormatter
. getFormatter
in interface NlsFormatterManager
NlsFormatter
instance.NlsFormatterManager.getFormatter(String, String)
public NlsFormatterPlugin<?> getFormatter(String formatType)
NlsFormatterManager
getFormatter
in interface NlsFormatterManager
formatType
- is the type to be formatted.NlsFormatter
instance.NlsFormatterManager.getFormatter(String, String)
Copyright © 2001–2016 mmm-Team. All rights reserved.