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

io.vertx.up.uca.serialization.BaseSaber Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.serialization;

import io.vertx.up.exception.web._400ParameterFromStringException;
import io.vertx.up.fn.Fn;
import io.vertx.up.log.Annal;
import io.vertx.up.runtime.ZeroSerializer;

public abstract class BaseSaber implements Saber {

    protected Annal getLogger() {
        return Annal.get(getClass());
    }

    void verifyInput(final boolean condition,
                     final Class paramType,
                     final String literal) {
        Fn.outUp(condition,
                getLogger(), _400ParameterFromStringException.class,
                ZeroSerializer.class, paramType, literal);
    }

    @Override
    public  Object from(final T input) {
        // Default direct
        return input;
    }

    @Override
    public Object from(final Class paramType,
                       final String literal) {
        // Default direct
        return literal;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy