Class FormatterPropertyEditorAdapter
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.format.support.FormatterPropertyEditorAdapter
- All Implemented Interfaces:
PropertyEditor
Adapter that bridges between
Formatter
and PropertyEditor
.- Since:
- 4.2
- Author:
- Juergen Hoeller
-
Constructor Summary
ConstructorDescriptionFormatterPropertyEditorAdapter
(Formatter<?> formatter) Create a newFormatterPropertyEditorAdapter
for the givenFormatter
. -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
Method Details
-
getFieldType
Determine theFormatter
-declared field type.- Returns:
- the field type declared in the wrapped
Formatter
implementation (nevernull
) - Throws:
IllegalArgumentException
- if theFormatter
-declared field type cannot be inferred
-
setAsText
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
getAsText
- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-