Class EnumTypeAdapter

java.lang.Object
org.eclipse.lemminx.customservice.synapse.utils.EnumTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Enum<?>>, com.google.gson.JsonSerializer<Enum<?>>

public class EnumTypeAdapter extends Object implements com.google.gson.JsonSerializer<Enum<?>>, com.google.gson.JsonDeserializer<Enum<?>>
  • Constructor Details

    • EnumTypeAdapter

      public EnumTypeAdapter()
  • Method Details

    • deserialize

      public Enum<?> deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Enum<?>>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(Enum<?> anEnum, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Enum<?>>