public class

CharacterEditor

extends PropertyEditorSupport
java.lang.Object
   ↳ java.beans.PropertyEditorSupport
     ↳ org.springframework.beans.propertyeditors.CharacterEditor

Class Overview

Editor for a java.lang.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; e.g. u0041 ('A').

See Also

Summary

Public Constructors
CharacterEditor(boolean allowEmpty)
Create a new CharacterEditor instance.
Public Methods
String getAsText()
void setAsText(String text)
[Expand]
Inherited Methods
From class java.beans.PropertyEditorSupport
From class java.lang.Object
From interface java.beans.PropertyEditor

Public Constructors

public CharacterEditor (boolean allowEmpty)

Also: SpringBeans

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 null value when text is being converted. If false, an IllegalArgumentException will be thrown at that time.

Parameters
allowEmpty if empty strings are to be allowed

Public Methods

public String getAsText ()

public void setAsText (String text)