Class ArtifactTypeAdapter

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

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

    • ArtifactTypeAdapter

      public ArtifactTypeAdapter()
  • Method Details

    • deserialize

      public CRArtifact 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<CRArtifact>
      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(CRArtifact crArtifact, Type type, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<CRArtifact>