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

com.github.leeonky.util.ConverterFactory Maven / Gradle / Ivy

The newest version!
package com.github.leeonky.util;

import java.util.Iterator;
import java.util.ServiceLoader;

public interface ConverterFactory {
    static Converter create() {
        Iterator iterator = ServiceLoader.load(ConverterFactory.class).iterator();
        if (iterator.hasNext())
            return iterator.next().newInstance();
        return Converter.createDefault().extend();
    }

    Converter newInstance();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy