com.atlassian.plugin.osgi.spring
Class DefaultSpringContainerAccessor
java.lang.Object
com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor
- All Implemented Interfaces:
- ContainerAccessor, SpringContainerAccessor
public class DefaultSpringContainerAccessor
- extends Object
- implements SpringContainerAccessor
Manages spring context access, including autowiring.
- Since:
- 2.2.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSpringContainerAccessor
public DefaultSpringContainerAccessor(Object applicationContext)
createBean
public <T> T createBean(Class<T> clazz)
- Specified by:
createBean in interface ContainerAccessor
injectBean
public <T> T injectBean(T bean)
- Specified by:
injectBean in interface ContainerAccessor
getBeansOfType
public <T> Collection<T> getBeansOfType(Class<T> interfaceClass)
- Specified by:
getBeansOfType in interface ContainerAccessor
autowireBean
public void autowireBean(Object instance,
AutowireCapablePlugin.AutowireStrategy autowireStrategy)
- Description copied from interface:
SpringContainerAccessor
- 'Autowires' a given object - injects all dependencies defined in the constructor.
- Specified by:
autowireBean in interface SpringContainerAccessor
- Parameters:
instance - the object instance to autowireautowireStrategy - the autowire strategy
getBean
public Object getBean(String id)
- Description copied from interface:
SpringContainerAccessor
- Retrieves a spring bean from the spring bean factory.
- Specified by:
getBean in interface ContainerAccessor- Specified by:
getBean in interface SpringContainerAccessor
- Parameters:
id - the id of the spring bean, cannot be null
- Returns:
- the spring bean object
Copyright © 2015 Atlassian. All rights reserved.