|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jsefa.common.converter.EnumConverter
public final class EnumConverter
Converter for JDK 1.5 enums.
The format is an array of mappings from the original String representation of an enum value to
the one which shall be used for serialization. Each mapping has the form
originalRepresentation=newRepresentation
Example: {"SENIOR_DEVELOPER=senior developer", "JUNIOR_DEVELOPER=junior developer"}
These mappings override the display name declarations provided by the EnumConstant annotations.
It is thread safe.
| Method Summary | |
|---|---|
static EnumConverter |
create(SimpleTypeConverterConfiguration configuration)
Constructs a new EnumConverter. |
Enum |
fromString(String value)
Converts the given String object into an object with the simple data type this converter is
intended for. |
String |
toString(Object value)
Converts the given value to a String object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static EnumConverter create(SimpleTypeConverterConfiguration configuration)
EnumConverter.
configuration - the configuration
public Enum fromString(String value)
String object into an object with the simple data type this converter is
intended for.
fromString in interface SimpleTypeConvertervalue - the String object to convert
public String toString(Object value)
String object.
toString in interface SimpleTypeConvertervalue - the value to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||