public class NlsFormatterType extends AbstractNlsFormatterPlugin<Object>
NlsFormatter that formats Types.| Modifier and Type | Field and Description |
|---|---|
private static Package |
PACKAGE_JAVA_LANG
The package
java.lang. |
private String |
style |
| Constructor and Description |
|---|
NlsFormatterType(String style)
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. |
private void |
toString(Type type,
Appendable appendable) |
toStringformatdoInitialize, doInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitformatprivate static final Package PACKAGE_JAVA_LANG
java.lang.private final String style
public String getStyle()
NlsFormatterPluginstyle of this formatter. See STYLE_* constants of
NlsFormatterManager e.g.
NlsFormatterManager.STYLE_LONG.null for no style.public String getType()
NlsFormatterPlugintype 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.public void format(Object object, Locale locale, Map<String,Object> arguments, NlsTemplateResolver resolver, Appendable buffer) throws IOException
NlsFormatterobject 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.private void toString(Type type, Appendable appendable)
Copyright © 2001–2019 mmm-Team. All rights reserved.