Class MaterialTypeAdapter

java.lang.Object
com.thoughtworks.go.plugin.configrepo.codec.TypeAdapter
com.thoughtworks.go.plugin.configrepo.codec.MaterialTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<CRMaterial>, com.google.gson.JsonSerializer<CRMaterial>

public class MaterialTypeAdapter extends TypeAdapter implements com.google.gson.JsonDeserializer<CRMaterial>, com.google.gson.JsonSerializer<CRMaterial>
  • Constructor Details

    • MaterialTypeAdapter

      public MaterialTypeAdapter()
  • Method Details

    • deserialize

      public CRMaterial deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<CRMaterial>
      Throws:
      com.google.gson.JsonParseException
    • classForName

      protected Class<?> classForName(String typeName, String origin)
      Specified by:
      classForName in class TypeAdapter
    • serialize

      public com.google.gson.JsonElement serialize(CRMaterial material, Type type, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<CRMaterial>