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

io.baltoro.service.ServiceFactory Maven / Gradle / Ivy

There is a newer version: 4.0.12
Show newest version
package io.baltoro.service;

public class ServiceFactory
{

	public static Service getInstance()
	{
		return new ServiceImpl();
	}
	
	
	public static  T get(Class _class)
	{
		Object service = null;
		try
		{
			Class clazz = Class.forName(_class.getName()+"Impl");
			service = clazz.newInstance();
		} 
		catch (Exception e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return _class.cast(service);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy