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

io.katharsis.locator.SampleJsonServiceLocator Maven / Gradle / Ivy

There is a newer version: 2.6.3
Show newest version
package io.katharsis.locator;

/**
 * Sample implementation of {@link JsonServiceLocator}. It makes new instance for every method call.
 */
public class SampleJsonServiceLocator implements JsonServiceLocator {
    @Override
    public  T getInstance(Class clazz) {
        try {
            return clazz.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy