|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FormatterFactory
Interface for creating instances of formatter classes that are capable of formatting the types specified into Strings.
Formatter
Method Summary | |
---|---|
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. |
Methods inherited from interface net.sourceforge.stripes.config.ConfigurableComponent |
---|
init |
Method Detail |
---|
Formatter<?> 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 formatting
UnsupportedOperationException
- if the implementation does not support adding
formatters at runtime
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |