|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor
public class DefaultSpringContainerAccessor
Manages spring context access, including autowiring.
| Constructor Summary | |
|---|---|
DefaultSpringContainerAccessor(java.lang.Object applicationContext)
|
|
| Method Summary | ||
|---|---|---|
void |
autowireBean(java.lang.Object instance,
AutowireCapablePlugin.AutowireStrategy autowireStrategy)
'Autowires' a given object - injects all dependencies defined in the constructor. |
|
|
createBean(java.lang.Class<T> clazz)
Will ask the container to instantiate a bean of the given class and does inject all constructor defined dependencies. |
|
java.lang.Object |
getBean(java.lang.String id)
Retrieves a spring bean from the spring bean factory. |
|
|
getBeansOfType(java.lang.Class<T> interfaceClass)
Gets all the beans that implement a given interface |
|
|
injectBean(T bean)
Injects an existing bean instance with any dependencies via setters or private field injection |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSpringContainerAccessor(java.lang.Object applicationContext)
| Method Detail |
|---|
public <T> T createBean(java.lang.Class<T> clazz)
ContainerAccessor
createBean in interface ContainerAccessorclazz - the Class to instantiate. Cannot be null.
public <T> T injectBean(T bean)
ContainerAccessor
injectBean in interface ContainerAccessorT - The bean typebean - The instantiated bean to injectpublic <T> java.util.Collection<T> getBeansOfType(java.lang.Class<T> interfaceClass)
ContainerAccessor
getBeansOfType in interface ContainerAccessorT - The target interface typeinterfaceClass - The interface class
public void autowireBean(java.lang.Object instance,
AutowireCapablePlugin.AutowireStrategy autowireStrategy)
SpringContainerAccessor
autowireBean in interface SpringContainerAccessorinstance - the object instance to autowireautowireStrategy - the autowire strategypublic java.lang.Object getBean(java.lang.String id)
SpringContainerAccessor
getBean in interface ContainerAccessorgetBean in interface SpringContainerAccessorid - the id of the spring bean, cannot be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||