Package net.sf.basedb.util.json
Class EnumConverter<T extends Enum<T>>
java.lang.Object
net.sf.basedb.util.json.EnumConverter<T>
- All Implemented Interfaces:
JsonConverter<Enum<T>>
Converted implementation that create JSON objects
with the NAME of enumeration.
- Since:
- 3.20
- Author:
- nicklas
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
EnumConverter
public EnumConverter()
-
-
Method Details
-
convert
Description copied from interface:JsonConverter
Convert the given object to a JSON-compatible object. The parameter may be null.- Specified by:
convert
in interfaceJsonConverter<T extends Enum<T>>
- Parameters:
object
- The objcet to convert- Returns:
- The JSON object
-
setMore
Can be used by subclasses to set more properties on the JSON object. The default implementation does nothing.- Parameters:
json
- The JSON object that store the converted propertiesobject
- The object that is being converted
-