*/
private List<ProviderFactory> loadProviderFactories(Class<?> factoryClass) {
// Get the provider factory service declarations
Collection<ServiceDeclaration> factoryDeclarations;
ServiceDiscovery serviceDiscovery = registry.getServiceDiscovery();
try {
factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass.getName(), true);
} catch (Exception e) {
throw new IllegalStateException(e);
}
List<ProviderFactory> factories = new ArrayList<ProviderFactory>();