|
||||||||||
| 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(Object applicationContext)
|
|
| Method Summary | ||
|---|---|---|
void |
autowireBean(Object instance,
AutowireCapablePlugin.AutowireStrategy autowireStrategy)
'Autowires' a given object - injects all dependencies defined in the constructor. |
|
|
createBean(Class<T> clazz)
Will ask the container to instantiate a bean of the given class and does inject all constructor defined dependencies. |
|
Object |
getBean(String id)
Retrieves a spring bean from the spring bean factory. |
|
|
getBeansOfType(Class<T> interfaceClass)
Gets all the beans that implement a given interface |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSpringContainerAccessor(Object applicationContext)
| Method Detail |
|---|
public <T> T createBean(Class<T> clazz)
ContainerAccessor
createBean in interface ContainerAccessorclazz - the Class to instantiate. Cannot be null.
public <T> Collection<T> getBeansOfType(Class<T> interfaceClass)
ContainerAccessor
getBeansOfType in interface ContainerAccessorT - The target interface typeinterfaceClass - The interface class
public void autowireBean(Object instance,
AutowireCapablePlugin.AutowireStrategy autowireStrategy)
SpringContainerAccessor
autowireBean in interface SpringContainerAccessorinstance - the object instance to autowireautowireStrategy - the autowire strategypublic Object getBean(String id)
SpringContainerAccessor
getBean 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 | |||||||||