StringConverter looking up enums.
This class is immutable and thread-safe.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final StringConverterFactory | INSTANCE
Singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public StringConverter | Returns: the converter, null if not foundthe type to lookup, not null cls)Implements org. |
| public String |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final StringConverterFactory INSTANCE Singleton instance. | |
| EnumStringConverterFactory | back to summary |
|---|---|
| private EnumStringConverterFactory() Restricted constructor. | |
| findConverter | back to summary |
|---|---|
| public StringConverter Implements org. Finds a converter by type.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Enum | convertFromString(Class<? extends Enum<?>>
the class to convert to, not null cls, String the string to convert, not null str)Implements org. String.
|
| public String | convertToString(Enum<?>
the object to convert, not null en)Implements org. String.
|
| public Class | getEffectiveType()
Implements org. |
| effectiveType | back to summary |
|---|---|
| private final Class<?> effectiveType | |
| EnumStringConverter | back to summary |
|---|---|
| pack-priv EnumStringConverter(Class<?> effectiveType) | |
| convertFromString | back to summary |
|---|---|
| public Enum Implements org. Doc from org. Converts the specified object from a | |
| convertToString | back to summary |
|---|---|
| public String convertToString(Enum<?> en) Implements org. Doc from org. Converts the specified object to a | |
| getEffectiveType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Gets the effective type that the converter works on.
For example, if a class declares the | |