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>
-
Field Summary
Fields inherited from class com.thoughtworks.go.plugin.configrepo.codec.TypeAdapter
ARTIFACT_ORIGIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<?>classForName(String typeName, String origin) deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElementserialize(CRMaterial material, Type type, com.google.gson.JsonSerializationContext context) Methods inherited from class com.thoughtworks.go.plugin.configrepo.codec.TypeAdapter
determineJsonElementForDistinguishingImplementers
-
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:
deserializein interfacecom.google.gson.JsonDeserializer<CRMaterial>- Throws:
com.google.gson.JsonParseException
-
classForName
- Specified by:
classForNamein classTypeAdapter
-
serialize
public com.google.gson.JsonElement serialize(CRMaterial material, Type type, com.google.gson.JsonSerializationContext context) - Specified by:
serializein interfacecom.google.gson.JsonSerializer<CRMaterial>
-