Class ConvertingPropertyEditorAdapter
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.core.convert.support.ConvertingPropertyEditorAdapter
- All Implemented Interfaces:
PropertyEditor
Adapter that exposes a
PropertyEditor for any given
ConversionService and specific target type.- Since:
- 3.0
- Author:
- Juergen Hoeller
-
Constructor Summary
ConstructorsConstructorDescriptionConvertingPropertyEditorAdapter(ConversionService conversionService, TypeDescriptor targetDescriptor) Create a new ConvertingPropertyEditorAdapter for a givenConversionServiceand the given target type. -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
ConvertingPropertyEditorAdapter
public ConvertingPropertyEditorAdapter(ConversionService conversionService, TypeDescriptor targetDescriptor) Create a new ConvertingPropertyEditorAdapter for a givenConversionServiceand the given target type.- Parameters:
conversionService- the ConversionService to delegate totargetDescriptor- the target type to convert to
-
-
Method Details
-
setAsText
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException
-
getAsText
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-