gw.lang.gosuc.GosucGlobalLoaderProvider Maven / Gradle / Ivy
/*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.lang.gosuc;
import gw.config.BaseService;
import gw.config.IGlobalLoaderProvider;
import gw.lang.init.GosuPathEntry;
import gw.lang.reflect.ITypeLoader;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
*/
public class GosucGlobalLoaderProvider extends BaseService implements IGlobalLoaderProvider {
private final List> _loaderClasses;
public GosucGlobalLoaderProvider(List classNames) {
_loaderClasses = new ArrayList>();
for (String name : classNames) {
try {
_loaderClasses.add((Class extends ITypeLoader>) Class.forName(name));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
@Override
public List> getGlobalLoaderTypes() {
return _loaderClasses;
}
}