public interface ContainerAccessor
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createBean(Class<T> clazz)
Will ask the container to instantiate a bean of the given class and does inject all constructor defined dependencies.
|
<T> T |
getBean(String id)
Retrieves a bean by name from the container.
|
<T> Collection<T> |
getBeansOfType(Class<T> interfaceClass)
Gets all the beans that implement a given interface
|
<T> T |
injectBean(T bean)
Injects an existing bean instance with any dependencies via setters or private field injection
|
<T> T createBean(Class<T> clazz)
clazz - the Class to instantiate. Cannot be null.<T> T injectBean(T bean)
T - The bean typebean - The instantiated bean to inject<T> T getBean(String id)
id - the id of the container bean, cannot be null<T> Collection<T> getBeansOfType(Class<T> interfaceClass)
T - The target interface typeinterfaceClass - The interface classCopyright © 2019 Atlassian. All rights reserved.