Find any provider loaders which are available in the container.
486537
private Map findLoaders() {
        Map loaders = getContainer().getComponentDescriptorMap(ProviderLoader.class.getName());
        if (loaders == null) {
            throw new Error("No provider loaders found");
        }

        Set keys = loaders.keySet();
        Map found = null;
        ProviderLoader defaultLoader = null;

        for (Iterator iter = keys.iterator(); iter.hasNext();) {
            String key = (String)iter.next();

            ProviderLoader loader;

            try {
                loader = (ProviderLoader) getContainer().lookup(ProviderLoader.class.getName(), key);
            }
            catch (Exception e) {
                log.warn("Failed to lookup provider loader for key: {}", key, e);
                continue;
            }

            if (loader != null) {
                if (found == null) {
                    // we need an ordered map
                    found = new LinkedHashMap();
                }
                if (key.equals(SELECT_DEFAULT)) {
                    defaultLoader = loader;
                }
                else {
                    found.put(key, loader);
                }
            }
        }

        // the default should be added at the end (as fallback)
        assert defaultLoader != null;
        found.put(SELECT_DEFAULT, defaultLoader);

        return found;
    }
1232346
void loadAdditionalServices(ServiceRegistry registry) {
        for (ResourceLoader loader : getResourceLoaders()) {
            for (Metadata<Service> metadata : ServiceLoader.load(Service.class, loader)) {
                Service service = metadata.getValue();
                for (Class<? extends Service> serviceInterface : Services.identifyServiceInterfaces(service.getClass(), new HashSet<>())) {
                    Services.put(registry, serviceInterface, service);
                }
            }
        }
    }
598812
def _initialize_providers(self):
        """"""
        configured_providers = active_config.DATABASES
        provider_objects = {}

        if not isinstance(configured_providers, dict) or configured_providers == {}:
            raise ConfigurationError(
                "'DATABASES' config must be a dict and at least one "
                "provider must be defined")

        if 'default' not in configured_providers:
            raise ConfigurationError(
                "You must define a 'default' provider")

        for provider_name, conn_info in configured_providers.items():
            provider_full_path = conn_info['PROVIDER']
            provider_module, provider_class = provider_full_path.rsplit('.', maxsplit=1)

            provider_cls = getattr(importlib.import_module(provider_module), provider_class)
            provider_objects[provider_name] = provider_cls(conn_info)

        return provider_objects
1149519
public static ProviderList getProviderList() {
        ProviderList list = getThreadProviderList();
        if (list == null) {
            list = getSystemProviderList();
        }
        return list;
    }
1206116
function getLoader (location) {
  var scheme = getScheme(location);
  var loader = supportedLoaders[scheme];

  if (typeof loader === 'undefined') {
    if (scheme === '') {
      loader = defaultLoader;
    } else {
      throw new Error('Unsupported scheme: ' + scheme);
    }
  }

  return loader;
}
1070769
private ExtensionLoader locateExtensionLoader() {
        Collection<ExtensionLoader> loaders = Collections.emptyList();
        if (SecurityActions.getThreadContextClassLoader() != null) {
            loaders = serviceLoader.all(SecurityActions.getThreadContextClassLoader(), ExtensionLoader.class);
        }
        if (loaders.size() == 0) {
            loaders = serviceLoader.all(LoadableExtensionLoader.class.getClassLoader(), ExtensionLoader.class);
        }
        if (loaders.size() > 1) {
            throw new RuntimeException("Multiple ExtensionLoader's found on classpath: " + toString(loaders));
        }
        if (loaders.size() == 1) {
            return loaders.iterator().next();
        }
        return serviceLoader;
    }
899139
def adapters(self):
        
        # We do here some lazy loading.
        if not self._adapters:
            self._adapters = AdapterManager(self)
        return self._adapters
616150
def get_plugin_classes(modules):
    """"""
    classes = (_ConnectionPlugin, _ContentPlugin, _ParserPlugin)
    return loader.get_plugins(modules, classes)
1119188
function provideRoutes(routes) {
    return [
        { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["ANALYZE_FOR_ENTRY_COMPONENTS"], multi: true, useValue: routes },
        { provide: __WEBPACK_IMPORTED_MODULE_10__router_config_loader__["a" /* ROUTES */], multi: true, useValue: routes },
    ];
}
843313
private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) {
		try {
			List<TableFactory> result = new LinkedList<>();
			if (classLoader.isPresent()) {
				ServiceLoader
					.load(TableFactory.class, classLoader.get())
					.iterator()
					.forEachRemaining(result::add);
			} else {
				defaultLoader.iterator().forEachRemaining(result::add);
			}
			return result;
		} catch (ServiceConfigurationError e) {
			LOG.error("Could not load service provider for table factories.", e);
			throw new TableException("Could not load service provider for table factories.", e);
		}

	}
473662
private List<Class<?>> loadServiceClasses(ClassLoader loader)
            throws MojoExecutionException {
        List<Class<?>> serviceClasses = new ArrayList<Class<?>>();
        for (String serviceClassName : getServices()) {
            try {
                Class<?> serviceClass = loader.loadClass(serviceClassName);
                serviceClasses.add(serviceClass);
            } catch (ClassNotFoundException ex) {
                throw new MojoExecutionException("Could not load class: " + serviceClassName, ex);
            }
        }
        return serviceClasses;
    }
1368420
def get_containers(self):
        """"""
        permitted = lambda c: settings.container_permitted(c.name)
        return [c for c in self._get_containers() if permitted(c)]
1355510
def get_dependants(cls, dist):
        """"""
        for package in cls.installed_distributions:
            for requirement_package in package.requires():
                requirement_name = requirement_package.project_name
                # perform case-insensitive matching
                if requirement_name.lower() == dist.lower():
                    yield package
1129727
function(loader, packageJSON, isRoot){
		var deps = crawl.getDependencyMap(loader, packageJSON, isRoot);

		var dependencies = [];
		for(var name in deps) {
			dependencies.push(deps[name]);
		}

		return dependencies;
	}
1021070
def loaders(self):  # pragma: no cover
        """"""
        if self.LOADERS_FOR_DYNACONF in (None, 0, "0", "false", False):
            self.logger.info("No loader defined")
            return []

        if not self._loaders:
            for loader_module_name in self.LOADERS_FOR_DYNACONF:
                loader = importlib.import_module(loader_module_name)
                self._loaders.append(loader)

        return self._loaders
289508
private static final void loadResources(final CClassLoader loader,
			final List URLList, final String resourceName) {
		final List l = loader.getPrivateResource(resourceName);

		if (l != null) {
			URLList.addAll(l);
		}

		final List loaderList = new ArrayList();

		for (final Iterator it = loader.childrenMap.entrySet().iterator(); it
				.hasNext();) {
			final Entry entry = (Entry) it.next();
			loaderList.add(entry.getValue());
		}

		for (int i = 0; i < loaderList.size(); i++) {
			final Object element = loaderList.get(i);
			final CClassLoader child = (CClassLoader) element;
			CClassLoader.loadResources(child, URLList, resourceName);
		}
	}
476986
public static List<URL> getClasspathURLs(ClassLoader loader) {
        List<URL> urls = Lists.newArrayList();
        if (loader != null) {
            final Enumeration<URL> resources;
            try {
                resources = loader.getResources("");
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            while (resources.hasMoreElements()) {
                URL location = resources.nextElement();
                urls.add(location);
            }
        }
        return urls;
    }