public interface FormatterFactory extends ConfigurableComponent
Formatter| Modifier and Type | Method and Description |
|---|---|
void |
add(Class<?> targetType,
Class<? extends Formatter<?>> formatterClass)
Adds a formatter to the set of registered formatters, overriding an existing formatter if one
was already registered for the type.
|
Formatter<?> |
getFormatter(Class<?> clazz,
Locale locale,
String formatType,
String formatPattern)
Returns a configured formatter that meets the criteria specified.
|
initFormatter<?> getFormatter(Class<?> clazz, Locale locale, String formatType, String formatPattern)
clazz - the type of object being formattedlocale - the Locale into which the object should be formattedformatType - the manner in which the object should be formatted (allows nulls)formatPattern - the named format, or format pattern to be applied (allows nulls)void add(Class<?> targetType, Class<? extends Formatter<?>> formatterClass)
UnsupportedOperationException.targetType - the type for which the formatter will handle formattingformatterClass - the implementation class that will handle the formattingUnsupportedOperationException - if the implementation does not support adding
formatters at runtime© Copyright 2005-2006, Stripes Development Team.