@Named @Singleton public class NlsFormatterDefault extends AbstractNlsFormatterPlugin<Object>
NlsFormatter
for default formatting.Constructor and Description |
---|
NlsFormatterDefault()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
format(Object object,
Locale locale,
Map<String,Object> arguments,
NlsTemplateResolver resolver,
Appendable buffer)
This method formats the given
object according to the given locale . |
String |
getStyle()
This method gets the
style of this formatter. |
String |
getType()
This method gets the
type of
this formatter. |
toString
format
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
format
public void format(Object object, Locale locale, Map<String,Object> arguments, NlsTemplateResolver resolver, Appendable buffer) throws IOException
NlsFormatter
object
according to the given locale
.object
- is the object to format.locale
- is the locale used for localized formatting.arguments
- is the Map
of arguments
.resolver
- is the NlsTemplateResolver
.buffer
- is where to append the formatted object
.IOException
- if the given Appendable
caused such exception.public String getStyle()
NlsFormatterPlugin
style
of this formatter. See STYLE_*
constants of
NlsFormatterManager
e.g.
NlsFormatterManager.STYLE_LONG
.null
for no style.public String getType()
NlsFormatterPlugin
type
of
this formatter. See TYPE_*
constants of NlsFormatterManager
e.g.
NlsFormatterManager.TYPE_NUMBER
.null
for the
default formatter
. If type is
null
then also style
needs to be null
.Copyright © 2001–2016 mmm-Team. All rights reserved.