PicoContainer and JIRA
JIRA uses Picocontainer as a central object factory. Picocontainer is responsible for instantiating objects and resolving their constructor dependencies. This greatly simplifies code, in that any Picocontainer-instantiated object (eg. a Webwork action) can obtain an instance of another (eg. a Manager class) simply by requesting one in its constructor. PicoContainer will ensure each object required in the constructor is passed in (aka dependency injection). Eg. the ViewIssue action:
Register new Picocontainer-managed classes
Picocontainer-managed classes need to be registered with Picocontainer. This happens automatically for Webwork actions, but other classes need to be registered manually. This is done in ComponentRegistrar's registerComponents() method:
Components can either by INTERNAL meaning that they will be available only to JIRA itself or PROVIDED in which case they will also be available to plugins2 plugins.
Components are generally only registered in the ComponentRegistrar, if they are required in JIRA internally. Plugin writers who wish to write to write their own components that can be injected in their plugin's classes should use the component plugin module.