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!
org. will register this
editor by default.
Also supports conversion from a Unicode character sequence; e.g.
u0041 ('A').
Character, org.springframework.beans.BeanWrapperImpl
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private static final int | UNICODE_LENGTH
The length of a Unicode character sequence. |
| private static final String | UNICODE_PREFIX
The prefix that identifies a string as being a Unicode character sequence. |
| Access | Constructor and Description |
|---|---|
| public | CharacterEditor(boolean
if empty strings are to be allowed allowEmpty)Create a new CharacterEditor instance. |
| Modifier and Type | Method and Description |
|---|---|
| public String | getAsText()
Overrides java. Implements java. Gets the property value as a string suitable for presentation to a human to edit. |
| private boolean | |
| public void | setAsText(String
The string to be parsed. text)Overrides java. Implements java. Sets the property value by parsing a given String. |
| private void |
| allowEmpty | back to summary |
|---|---|
| private final boolean allowEmpty | |
| UNICODE_LENGTH | back to summary |
|---|---|
| private static final int UNICODE_LENGTH The length of a Unicode character sequence. | |
| UNICODE_PREFIX | back to summary |
|---|---|
| private static final String UNICODE_PREFIX The prefix that identifies a string as being a Unicode character sequence. | |
| CharacterEditor | back to summary |
|---|---|
| public 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
| |
| getAsText | back to summary |
|---|---|
| public String getAsText() Overrides java. Implements java. Doc from java. Gets the property value as a string suitable for presentation to a human to edit. | |
| isUnicodeCharacterSequence | back to summary |
|---|---|
| private boolean isUnicodeCharacterSequence(String sequence) | |
| setAsText | back to summary |
|---|---|
| public void setAsText(String text) throws IllegalArgumentException Overrides java. Implements java. Doc from java. Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. | |
| setAsUnicode | back to summary |
|---|---|
| private void setAsUnicode(String text) | |