Class CharacterEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.CharacterEditor
- All Implemented Interfaces:
- PropertyEditor
Editor for a 
Character, to populate a property
 of type Character or char from a String value.
 Note that the JDK does not contain a default
 property editor for char!
 BeanWrapperImpl will register this
 editor by default.
 
Also supports conversion from a Unicode character sequence; for example,
 u0041 ('A').
- Since:
- 1.2
- Author:
- Juergen Hoeller, Rob Harrop, Rick Evans
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.beans.PropertyEditorSupportaddPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
- 
Constructor Details- 
CharacterEditorpublic CharacterEditor(boolean allowEmpty) Create a new CharacterEditor instance.The "allowEmpty" parameter controls whether an empty String is to be allowed in parsing, i.e. be interpreted as the nullvalue whentext is being converted. Iffalse, anIllegalArgumentExceptionwill be thrown at that time.- Parameters:
- allowEmpty- if empty strings are to be allowed
 
 
- 
- 
Method Details- 
setAsText- Specified by:
- setAsTextin interface- PropertyEditor
- Overrides:
- setAsTextin class- PropertyEditorSupport
- Throws:
- IllegalArgumentException
 
- 
getAsText- Specified by:
- getAsTextin interface- PropertyEditor
- Overrides:
- getAsTextin class- PropertyEditorSupport
 
 
-