Class EnumTypeAnnotationTypeAdapter
- java.lang.Object
-
- com.google.gson.TypeAdapter<EnumAnnotation>
-
- org.mule.metadata.persistence.type.adapter.EnumTypeAnnotationTypeAdapter
-
public final class EnumTypeAnnotationTypeAdapter extends com.google.gson.TypeAdapter<EnumAnnotation>
TypeAdapterimplementation to be able to serializeEnumAnnotationinstances. ThisTypeAnnotationrequires a specialTypeAdapterdue that Enum can be of an generic type.To not loose the Type information, this
TypeAdapterserializes the generic type of the Enum to be able to create the same instance at deserialization time.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description EnumTypeAnnotationTypeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumAnnotationread(com.google.gson.stream.JsonReader in)voidwrite(com.google.gson.stream.JsonWriter out, EnumAnnotation value)
-
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter out, EnumAnnotation value) throws IOException- Specified by:
writein classcom.google.gson.TypeAdapter<EnumAnnotation>- Throws:
IOException
-
read
public EnumAnnotation read(com.google.gson.stream.JsonReader in) throws IOException
- Specified by:
readin classcom.google.gson.TypeAdapter<EnumAnnotation>- Throws:
IOException
-
-