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

com.github.lontime.extjobrunr.common.SerializerKind Maven / Gradle / Ivy

package com.github.lontime.extjobrunr.common;

import com.github.lontime.extjobrunr.common.JodaJsonMapper;
import org.jobrunr.utils.mapper.JsonMapper;
import org.jobrunr.utils.mapper.gson.GsonJsonMapper;
import org.jobrunr.utils.mapper.jackson.JacksonJsonMapper;

/**
 * SerializerKind.
 * @author lontime
 * @since 1.0
 */
public enum SerializerKind {

    /**
     * gson.
     */
    GSON,
    /**
     * gson.
     */
    JODA,
    /**
     * jasckson.
     */
    JASCKSON;

    SerializerKind() {
    }

    public JsonMapper getJsonMapper() {
        if (this == GSON) {
            return new GsonJsonMapper();
        }
        if (this == JASCKSON) {
            return new JacksonJsonMapper();
        }

        return new JodaJsonMapper();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy