net.sf.mmm.util.nls.impl.formatter
Class NlsFormatterManagerImpl
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.nls.base.AbstractNlsFormatterManager
net.sf.mmm.util.nls.base.MappedNlsFormatterManager
net.sf.mmm.util.nls.impl.formatter.NlsFormatterManagerImpl
- All Implemented Interfaces:
- NlsArgumentParser, NlsFormatterManager
@Named
@Singleton
public class NlsFormatterManagerImpl
- extends MappedNlsFormatterManager
This is the implementation of the
NlsFormatterManager interface.
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Fields inherited from interface net.sf.mmm.util.nls.api.NlsFormatterManager |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nlsDependencies
private NlsDependencies nlsDependencies
- See Also:
setNlsDependencies(NlsDependencies)
NlsFormatterManagerImpl
public NlsFormatterManagerImpl()
- The constructor.
doInitialize
protected void doInitialize()
- This method performs the actual
initialization. It is
called when AbstractComponent.initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a
super.AbstractComponent.doInitialize().
- Overrides:
doInitialize in class AbstractNlsFormatterManager
getSubFormatter
protected NlsFormatter<?> getSubFormatter(String formatType,
CharSequenceScanner scanner)
- This method is like
NlsFormatterManager.getFormatter(String, String) but reads the
style from the given scanner.
- Overrides:
getSubFormatter in class AbstractNlsFormatterManager
- Parameters:
formatType - is the type to be formatted.scanner - is the current CharSequenceScanner for parsing the
style defining details of formatting.
- Returns:
- the according
NlsFormatter.
getSubFormatter
protected NlsFormatter<Object> getSubFormatter(String formatType,
String subformat)
- This method creates the
NlsFormatter for the given
formatType and the custom subformat. It is called
if no formatter is
registered for the given arguments.
- Overrides:
getSubFormatter in class MappedNlsFormatterManager
- Parameters:
formatType - is the type to be formatted.subformat - is the custom formatStyle for which no static formatter is
registered.
- Returns:
- the according custom formatter or
null if no such
formatter is could be created.
getNlsDependencies
public NlsDependencies getNlsDependencies()
- Returns:
- the nlsDependencies
setNlsDependencies
@Inject
public void setNlsDependencies(NlsDependencies nlsDependencies)
- This method sets the
NlsDependencies to use.
- Parameters:
nlsDependencies - are the NlsDependencies.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.