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

cz.jalasoft.lifeconfig.converterprovider.ConverterNotFoundThrowingConverterProvider Maven / Gradle / Ivy

package cz.jalasoft.lifeconfig.converterprovider;

import cz.jalasoft.lifeconfig.converter.Converter;

import java.lang.reflect.Method;

/**
 * This simple conversion silly returns "I did not find any converter to process the conversion"
 * @author Honza Lastovicka ([email protected])
 * @since 2016-09-19.
 */
public final class ConverterNotFoundThrowingConverterProvider implements ConverterProvider {

    @Override
    public Converter converter(Object sourceValue, Method method) throws ConverterNotFoundException {
        throw new ConverterNotFoundException(sourceValue.getClass(), method.getReturnType().getClass());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy