|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeConverter<T>
Interface for all type converters in the validation system that provide facilities for converting from String to a specific object type.
Method Summary | |
---|---|
T |
convert(String input,
Class<? extends T> targetType,
Collection<ValidationError> errors)
Convert a String to the target type supported by this converter. |
void |
setLocale(Locale locale)
Sets the locale that the TypeConverter can expect incoming Strings to be in. |
Method Detail |
---|
void setLocale(Locale locale)
locale
- the locale that the TypeConverter will be converting from.T convert(String input, Class<? extends T> targetType, Collection<ValidationError> errors)
input
- the String being convertedtargetType
- the Class representing the type of the property to which the return
value of the conversion will be assigned. In many cases this can be ignored as
converters will return a single type more often than not.errors
- an empty collection of validation errors that should be populated by the
converter for any errors that occur during validation that are user input related.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |