public abstract class AbstractPropertyEditorConverterSupport<T> extends PropertyEditorSupport implements Converter<String,T>
PropertyEditorSupport,
Converter| Constructor and Description |
|---|
AbstractPropertyEditorConverterSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected T |
assertConverted(String source,
T convertedValue,
Class<T> type)
Asserts that the given String was successfully converted into an instance of Class type T.
|
void |
setAsText(String text)
Sets the value of this PropertyEditor with the given String converted to the appropriate Class type.
|
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditorpublic AbstractPropertyEditorConverterSupport()
protected T assertConverted(String source, T convertedValue, Class<T> type)
source - the String to convert.convertedValue - the value of the String converted into instance of Class type T.type - the target Class type of the converted value.IllegalArgumentException - if the String could not be converted into
an instance of Class type T.public void setAsText(String text) throws IllegalArgumentException
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupporttext - the String to convert.IllegalArgumentException - if the String could not be converted into
an instance of Class type T.Converter.convert(Object),
PropertyEditorSupport.setValue(Object)