public interface ContainerProvider
Provider for conveniently registering container definitions with the container manager and providing instances of containers generated based on specific rules, similar to FactoryBean in spring.
Since the manager caches all container instances created within its management scope, the container provider does not need to cache the created container instances unless there are specific cases where multiple namespaces require the same instance.
ContainerManager,
Container| 限定符和类型 | 方法和说明 |
|---|---|
default boolean |
containsContainer(String namespace)
Whether this provider has container of given
namespace. |
<K> @Nullable Container<K> |
getContainer(String namespace)
Get container instance by given namespace
|
<K> @Nullable Container<K> getContainer(String namespace)
K - key typenamespace - namespace of containerdefault boolean containsContainer(String namespace)
namespace.namespace - namespaceCopyright © 2024. All rights reserved.