public interface

ContainerAccessor

com.atlassian.plugin.module.ContainerAccessor
Known Indirect Subclasses

Class Overview

The ContainerAccessor allows access to the underlying plugin container (e.g. spring).

Summary

Public Methods
abstract <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.
abstract <T> Collection<T> getBeansOfType(Class<T> interfaceClass)
Gets all the beans that implement a given interface

Public Methods

public abstract T createBean (Class<T> clazz)

Will ask the container to instantiate a bean of the given class and does inject all constructor defined dependencies. Currently we have only spring as a container that will autowire this bean.

Parameters
clazz the Class to instantiate. Cannot be null.
Returns
  • an instantiated bean.

public abstract Collection<T> getBeansOfType (Class<T> interfaceClass)

Gets all the beans that implement a given interface

Parameters
interfaceClass The interface class
Returns
  • A collection of implementations from the plugin's container