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>
-
Field Summary
Fields inherited from class com.thoughtworks.go.plugin.configrepo.codec.TypeAdapter
ARTIFACT_ORIGIN -
Constructor Summary
Constructors Constructor Description ArtifactTypeAdapter() -
Method Summary
Modifier and Type Method Description protected java.lang.Class<?>classForName(java.lang.String typeName, java.lang.String origin)CRArtifactdeserialize(com.google.gson.JsonElement json, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context)com.google.gson.JsonElementserialize(CRArtifact crArtifact, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)Methods inherited from class com.thoughtworks.go.plugin.configrepo.codec.TypeAdapter
determineJsonElementForDistinguishingImplementersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ArtifactTypeAdapter
public ArtifactTypeAdapter()
-
-
Method Details
-
deserialize
public CRArtifact deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<CRArtifact>- Throws:
com.google.gson.JsonParseException
-
classForName
protected java.lang.Class<?> classForName(java.lang.String typeName, java.lang.String origin)- Specified by:
classForNamein classTypeAdapter
-
serialize
public com.google.gson.JsonElement serialize(CRArtifact crArtifact, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)- Specified by:
serializein interfacecom.google.gson.JsonSerializer<CRArtifact>
-