chao.java.tools.servicepool.BuildInServiceLoader Maven / Gradle / Ivy
package chao.java.tools.servicepool;
import java.util.ArrayList;
import java.util.List;
/**
*
* chao.java.tools.servicepool.gen.ServiceFactoriesInstance
* chao.java.tools.servicepool.gen.InitServiceManagerInstance
* chao.java.tools.servicepool.gen.PathServicesInstance
* chao.android.tools.servicepool.AndroidNoOpInstantiator
*
* @author luqin
* @since 2020/9/6
*/
public class BuildInServiceLoader implements IServiceLoader {
private List> services;
public BuildInServiceLoader() {
services = new ArrayList<>();
try {
services.add(Class.forName("chao.java.tools.servicepool.gen.PathServicesInstance").asSubclass(IService.class));
services.add(Class.forName("chao.java.tools.servicepool.gen.ServiceFactoriesInstance").asSubclass(IService.class));
services.add(Class.forName("chao.java.tools.servicepool.gen.InitServiceManagerInstance").asSubclass(IService.class));
} catch (ClassNotFoundException e) {
throw new ServicePoolException("build in services not found.", e);
}
}
@Override
public Iterable> getServices() {
return services;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy