Add a provider by specifying the class that should be used to load dependencies and create maps instances
@param {String} providerName
@param {String|Object} provider classpath or Object with methods "load", "getMap" and "disposeMap"
975625
function (providerName, provider) {
                if (providers[providerName]) {
                    this.$logError(this.DUPLICATED_PROVIDER, providerName);
                } else {
                    if (ariaUtilsType.isObject(provider)) {
                        if (this._isValidProvider(provider)) {
                            providerInstances[providerName] = provider;
                            providers[providerName] = provider;
                        } else {
                            this.$logError(this.INVALID_PROVIDER, providerName);
                        }
                    } else {
                        providers[providerName] = provider;
                    }
                }
            }
390045
@Override
    public DEBBuilder addProvide(String name, String version, Condition... dependency)
    {
        control.addProvides(name);
        return this;
    }
304147
@SuppressWarnings("unchecked")
	public <T> RestBuilder addProvider(Class<? extends ContextProvider<T>> provider) {

		Assert.notNull(provider, "Missing context provider!");
		registeredProviders.put(null, provider);
		return this;
	}
577925
private <T> Provider<T> createProvider(Key<T> key)
  {
    Class<T> type = (Class<T>) key.rawClass();

    if (Provider.class.equals(type)) {
      TypeRef subType = TypeRef.of(key.type()).to(Provider.class).param(0);

      Key<Object> subkey = Key.of(subType.type(), key.annotationTypes());

      return (Provider) new ProviderProvider(key, -10, provider(subkey));
    }
    else if (Optional.class.equals(type)) {
      TypeRef subType = TypeRef.of(key.type()).to(Optional.class).param(0);

      Key<Object> subkey = Key.of(subType.type(), key.annotationTypes());

      return (Provider) new ProviderOptional(key, -10, provider(subkey));
    }
    else if (type.isInterface() || Modifier.isAbstract(type.getModifiers())) {
      return new ProviderNull(key, -10000, new InjectScopeSingleton());
    }

    int priority = -10;

    // auto-provider is factory
    InjectScope<T> scope = findScope(type);

    BindingAmp<T> binding = new ProviderConstructor<>(this, key, priority, scope, type);

    binding.bind();

    return binding.provider();
  }
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;
    }
1008368
@SuppressWarnings("unchecked")
    @Override
    public <T> T onSingletonProviderInit(T provider, Object context, Message m) {
        if (context == null) {
            return null;
        }
        Map<Class<?>, ManagedObject<?>> newContext = (Map<Class<?>, ManagedObject<?>>) (context);
        if (newContext.isEmpty()) {
            return null;
        }
        ManagedObject<?> managedObject = newContext.get(provider.getClass());
        Object newProviderObject = null;
        if (managedObject == null) {
            newProviderObject = getInstanceFromManagedObject(provider, context);
        } else {
            newProviderObject = managedObject.getObject();
        }

        return (T) newProviderObject;
    }
501329
@Override
    public void installProvider(boolean clientSide, List<Object> providers, Set<String> features) {
        if (!clientSide) {
            if (getAddCustomExceptionMapperFlag(providers))
            {
                providers.add(new CustomWebApplicationExceptionMapper());
            }
        }

    }
1189554
function (providerName) {
                this.destroyAllMaps(providerName);
                delete providers[providerName];
                if (providerInstancesToDispose[providerName]) {
                    providerInstancesToDispose[providerName].$dispose();
                    delete providerInstancesToDispose[providerName];
                }
                delete providerInstances[providerName];
            }
1104327
function Supply(provider, options) {
  if (!this) return new Supply(provider, options);

  options = options || {};

  this.provider = provider || this;
  this.layers = [];
  this.length = 0;

  if ('function' === typeof this.initialize) {
    this.initialize(options);
  }
}
998216
@Override
    public T addClasses(Class<?>... classes) throws IllegalArgumentException {
        Validate.notNull(classes, "Classes must be specified");

        for (final Class<?> clazz : classes) {
            Asset resource = new ClassAsset(clazz);
            ArchivePath location = new BasicPath(getClassesPath(), AssetUtil.getFullPathForClassResource(clazz));
            add(resource, location);

            // SHRINKWRAP-335, account for classes loaded from the
            // Bootstrap CL (some JDK impls may return null on class.getClassLoader)
            final ClassLoader loadingCl = clazz.getClassLoader();
            final ClassLoader adjustedCl = loadingCl == null ? ClassLoader.getSystemClassLoader() : loadingCl;

            // Get all inner classes and add them
            addPackages(false, new Filter<ArchivePath>() {
                /**
                 * path = /package/MyClass$Test.class <br/>
                 * clazz = /package/MyClass.class <br/>
                 *
                 *
                 * @param path
                 *            The added classes
                 * @return
                 */
                @Override
                public boolean include(ArchivePath path) {
                    ArchivePath classArchivePath = AssetUtil.getFullPathForClassResource(clazz);
                    String expression = classArchivePath.get().replace(".class", "\\$.*");
                    return path.get().matches(expression);
                };
            }, adjustedCl,
            // Assumes a null package is a class in the default package
                clazz.getPackage() == null ? DEFAULT_PACKAGE_NAME : clazz.getPackage().getName());
        }
        return covarientReturn();
    }
555070
public void setProvider(String provider)
    {
        if (provider != null && provider.endsWith(".class"))
        {
            this.provider = provider.substring(0, provider.length() - 6);
        }
        this.provider = provider;
    }
1298923
function createProviderInjector(cache) {
	const injector = createInjector(cache, function(name) {
		throw new Error(`Unknown provider: ${name}`);
	});

	injector.cache = cache;

	cache.$injector = injector;

	return injector;
}
398278
private Provider createPKCS11Provider(String configFileName) throws Exception {

        Provider provider = null;
        if (JavaInfo.majorVersion() >= 9) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "The java version is 9 or higher so take new path to setup the pkcs11 provider.");
            provider = getProvider(configFileName);
        } else {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Calling legacy method to setup the pkcs11 provider.");
            provider = getProviderLegacy(configFileName);
        }
        return provider;
    }
898168
function loadResourcesHandler (classpath, self) {
        var Handler = Aria.getClassRef(classpath);

        if (Handler) {
            return new Handler();
        } else {
            var callbackArgs = {
                scope : self,
                classpath : classpath
            };

            Aria.load({
                classes : [classpath],
                oncomplete : {
                    fn : delayLoading,
                    args : callbackArgs
                },
                onerror : {
                    fn : resourcesHandlerError,
                    args : callbackArgs
                }
            });

            return new PromisedHandler();
        }
    }
578856
function (packageList)
		{
			var classes;
			var className;
			var classSource;
			var classBuilder = this.getComponent('classBuilder');
			for (p in packageList)
			{
				classes = packageList[p].classes;
				for (c in classes)
				{
					className = c;
					classBuilder.addSource(className,classes[c],true);
				}
			}

			classBuilder.load();
			classBuilder.build();
		}
228180
private void getEJBWithProviderClasses(Set<String> classeNames, EJBEndpoint ejb, String ejbInterfaceName, ClassLoader appClassloader) {
        final String methodName = "getEJBWithProviderClasses";
        if (tc.isEntryEnabled())
            Tr.entry(tc, methodName, classeNames, ejb, ejbInterfaceName);

        if (classeNames == null) {
            if (tc.isEntryEnabled())
                Tr.exit(tc, methodName, Collections.emptySet());
            return;
        }

        Class<Provider> providerClass = Provider.class;
        final String ejbClassName = (ejbInterfaceName == null) ? ejb.getClassName() : ejbInterfaceName;
        Class<?> c = null;
        try {
            c = appClassloader.loadClass(ejbClassName);
        } catch (ClassNotFoundException e) {

//            if (tc.isDebugEnabled()) {
//                Tr.debug(tc, "getEJBWithProviderClasses() exit - due to Class Not Found for " + ejbClassName + ": " + e);
//            }
            Tr.error(tc, "error.failed.toloadejbclass", ejbClassName);
        }

        if (c != null && c.getAnnotation(providerClass) != null) {
            classeNames.add(ejbClassName);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, methodName, classeNames);
    }
126675
private AbstractPlugin load(final String pluginDirPath, final Map<String, HashSet<AbstractPlugin>> holder) throws Exception {
        final Properties props = new Properties();
        final ServletContext servletContext = AbstractServletListener.getServletContext();

        String plugin = StringUtils.substringAfter(pluginDirPath, "/plugins");
        plugin = plugin.replace("/", "");

        final File file = Latkes.getWebFile("/plugins/" + plugin + "/plugin.properties");
        props.load(new FileInputStream(file));

        final URL defaultClassesFileDirURL = servletContext.getResource("/plugins/" + plugin + "classes");
        URL classesFileDirURL = null;
        try {
            classesFileDirURL = servletContext.getResource(props.getProperty("classesDirPath"));
        } catch (final MalformedURLException e) {
            LOGGER.log(Level.ERROR, "Reads [" + props.getProperty("classesDirPath") + "] failed", e);
        }

        final URLClassLoader classLoader = new URLClassLoader(new URL[]{
                defaultClassesFileDirURL, classesFileDirURL}, PluginManager.class.getClassLoader());

        classLoaders.add(classLoader);

        String pluginClassName = props.getProperty(Plugin.PLUGIN_CLASS);
        if (StringUtils.isBlank(pluginClassName)) {
            pluginClassName = NotInteractivePlugin.class.getName();
        }

        final String rendererId = props.getProperty(Plugin.PLUGIN_RENDERER_ID);

        if (StringUtils.isBlank(rendererId)) {
            LOGGER.log(Level.WARN, "no renderer defined by this plugin[" + plugin + "]，this plugin will be ignore!");
            return null;
        }

        final Class<?> pluginClass = classLoader.loadClass(pluginClassName);

        LOGGER.log(Level.TRACE, "Loading plugin class[name={0}]", pluginClassName);
        final AbstractPlugin ret = (AbstractPlugin) pluginClass.newInstance();

        ret.setRendererId(rendererId);

        setPluginProps(plugin, ret, props);
        registerEventListeners(props, classLoader, ret);
        register(ret, holder);

        ret.changeStatus();

        return ret;
    }