generic formatter registry
This commit is contained in:
@@ -10,7 +10,7 @@ import org.springframework.binding.format.formatters.BooleanFormatter;
|
||||
import org.springframework.binding.format.formatters.DateFormatter;
|
||||
import org.springframework.binding.format.formatters.NumberFormatter;
|
||||
|
||||
public class DefaultFormatterRegistry extends FormatterRegistryImpl {
|
||||
public class DefaultFormatterRegistry extends GenericFormatterRegistry {
|
||||
|
||||
/**
|
||||
* A singleton shared instance. Should never be modified.
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Keith Donald
|
||||
*/
|
||||
public class FormatterRegistryImpl implements FormatterRegistry {
|
||||
public class GenericFormatterRegistry implements FormatterRegistry {
|
||||
|
||||
private Map formattersById = new HashMap();
|
||||
|
||||
@@ -7,11 +7,11 @@ import junit.framework.TestCase;
|
||||
import org.springframework.binding.format.Formatter;
|
||||
import org.springframework.binding.format.InvalidFormatException;
|
||||
import org.springframework.binding.format.formatters.NumberFormatter;
|
||||
import org.springframework.binding.format.registry.FormatterRegistryImpl;
|
||||
import org.springframework.binding.format.registry.GenericFormatterRegistry;
|
||||
|
||||
public class FormatterRegistryImplTests extends TestCase {
|
||||
|
||||
FormatterRegistryImpl registry = new FormatterRegistryImpl();
|
||||
GenericFormatterRegistry registry = new GenericFormatterRegistry();
|
||||
|
||||
public void testRegisterAndGetFormatter() {
|
||||
registry.registerFormatter(Integer.class, new NumberFormatter(Integer.class));
|
||||
|
||||
Reference in New Issue
Block a user