Class EnumSerializer
java.lang.Object
org.spincast.plugins.gson.serializers.EnumSerializer
- All Implemented Interfaces:
com.google.gson.JsonSerializer<Enum<?>>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEnumSerializer(org.spincast.core.json.JsonObjectFactory jsonObjectFactory, JsonObjectSerializer jsonObjectSerializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.spincast.core.json.JsonObjectFactoryprotected JsonObjectSerializercom.google.gson.JsonElement
-
Field Details
-
ENUM_SERIALIZER_FIELD_NAME_NAME
- See Also:
-
ENUM_SERIALIZER_FIELD_NAME_LABEL
- See Also:
-
-
Constructor Details
-
EnumSerializer
@Inject public EnumSerializer(org.spincast.core.json.JsonObjectFactory jsonObjectFactory, JsonObjectSerializer jsonObjectSerializer)
-
-
Method Details
-
getJsonObjectFactory
protected org.spincast.core.json.JsonObjectFactory getJsonObjectFactory() -
getJsonObjectSerializer
-
serialize
public com.google.gson.JsonElement serialize(Enum<?> enumValue, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serializein interfacecom.google.gson.JsonSerializer<Enum<?>>
-