net.sf.mmm.util.nls.api
Interface NlsFormatterPlugin<O>

Type Parameters:
O - is the generic type of the object to format.
All Superinterfaces:
NlsFormatter<O>
All Known Implementing Classes:
AbstractNlsFormatterDateIso8601, AbstractNlsFormatterPlugin, AbstractSimpleNlsFormatterDate, NlsFormatterChoice, NlsFormatterCurrency, NlsFormatterDate, NlsFormatterDateFull, NlsFormatterDateIso8601, NlsFormatterDateLong, NlsFormatterDateMedium, NlsFormatterDatePattern, NlsFormatterDateShort, NlsFormatterDateTime, NlsFormatterDateTimeFull, NlsFormatterDateTimeIso8601, NlsFormatterDateTimeLong, NlsFormatterDateTimeMedium, NlsFormatterDateTimeShort, NlsFormatterDefault, NlsFormatterInteger, NlsFormatterNumber, NlsFormatterNumberPattern, NlsFormatterPercent, NlsFormatterTime, NlsFormatterTimeFull, NlsFormatterTimeIso8601, NlsFormatterTimeLong, NlsFormatterTimeMedium, NlsFormatterTimeShort, NlsFormatterType, NlsFormatterTypeFull, NlsFormatterTypeLong, NlsFormatterTypeMedium, NlsFormatterTypeShort, SimpleNlsFormatter

@ComponentSpecification(plugin=true)
public interface NlsFormatterPlugin<O>
extends NlsFormatter<O>

This interface extends NlsFormatter with the methods required to register this automatically as plugin via injection.
All subclasses annotated with @Named will automatically be registered. If no NlsFormatterPlugin with default style (null) is found for some type the one with medium style is used as default.

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Method Summary
 String getStyle()
          This method gets the style of this formatter.
 String getType()
          This method gets the type of this formatter.
 
Methods inherited from interface net.sf.mmm.util.nls.api.NlsFormatter
format, format
 

Method Detail

getType

String getType()
This method gets the type of this formatter. See TYPE_* constants of NlsFormatterManager e.g. NlsFormatterManager.TYPE_NUMBER.

Returns:
the type or null for the default formatter. If type is null then also style needs to be null.

getStyle

String getStyle()
This method gets the style of this formatter. See STYLE_* constants of NlsFormatterManager e.g. NlsFormatterManager.STYLE_LONG.

Returns:
the style or null for no style.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.