additional javadoc and tests

This commit is contained in:
Keith Donald
2009-11-21 18:30:34 +00:00
parent e3462aeef3
commit 9d354192ef
4 changed files with 89 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ public class ConversionServiceFactoryBean implements FactoryBean<ConversionServi
/**
* Creates the ConversionService instance returned by this factory bean.
* Creates a default conversion service instance by default.
* Subclasses may override to customize the ConversionService instance that gets created.
* @see ConversionServiceFactory#createDefaultConversionService()
*/
protected ConversionService createConversionService() {
return ConversionServiceFactory.createDefaultConversionService();

View File

@@ -60,6 +60,10 @@ public class FormattingConversionServiceFactoryBean implements FactoryBean<Conve
// subclassing hooks
/**
* Install Formatters and Converters into the new FormattingConversionService using the FormatterRegistry SPI.
* Subclasses may override to customize the set of formatters and/or converters that are installed.
*/
protected void installFormatters(FormatterRegistry registry) {
registry.addFormatterForFieldType(Number.class, new NumberFormatter());
registry.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());