All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.casper.sdk.jackson.deserializer.KindDeserializer Maven / Gradle / Ivy

Go to download

SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.

The newest version!
package com.casper.sdk.jackson.deserializer;

import com.casper.sdk.exception.NoSuchTypeException;
import com.casper.sdk.model.deploy.transform.TransformKindV2;
import com.fasterxml.jackson.databind.BeanProperty;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
import com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer;

/**
 * Deserializer for {@link TransformKindV2} types.
 *
 * @author [email protected]
 */
public class KindDeserializer extends AbstractAnyOfDeserializer {
    public KindDeserializer(JavaType bt, TypeIdResolver idRes, String typePropertyName, boolean typeIdVisible, JavaType defaultImpl) {
        super(bt, idRes, typePropertyName, typeIdVisible, defaultImpl);
    }

    public KindDeserializer(AsPropertyTypeDeserializer src, BeanProperty property) {
        super(src, property);
    }

    @Override
    public TypeDeserializer forProperty(final BeanProperty prop) {
        return (prop == _property) ? this : new KindDeserializer(this, prop);
    }

    @Override
    protected Class getClassByName(String classType) throws NoSuchTypeException {
        return TransformKindV2.getClassByName(classType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy