See Martin Fowlers's Inversion of Control Containers and the Dependency Injection patten article from 2003 for a thorough description. Surely everyone has read this by now?
Very quickly: Dependency Injection is where components are given their dependencies through their constructors, methods, or directly into fields. Those components do not get their dependencies themselves, or instantiate them directly. This is very much related to the encompassing design principle Inversion of Control.
PicoContainer supports multiple ways to specify the injection of dependencies into components. Constructor injection (listed first) is the recomended idiom for PicoContainer. Other types leverage fields and methods. Variations of the method types, can follow a naming convention or be marked with an annotation. Dependencies for those could be populated one by one, or all in one method call. Indeed components could be populated with combinations of Constructor, Method and Field Injection.
| Regular Injection Types | |
| Constructor Injection | Where a the constructor of a class is used to pass dependencies into it. |
| Setter Injection | Multiple Setter methods on the class are used to pass dependencies in. |
| Annotated Method Injection | Methods are marked with an annotation to indicate that they should be used for injecting dependencies |
| Field Injection | Fields are injected into for dependencies |
| Annotated Field Injection | Fields are marked with an annotation to indicate that they should be injected into |
| Named Field Injection | Fields of a certain name should be injected into |
| Typed Field Injection | Fields of a certain type should be injected into |
| Irregular Injection Types | |
| Adapting Injection | Adapting Injection finds which types of injection are pertinant to a component and builds an injector that fits it precisely. This is the default type of injection for DefaultPicoContainer |
| Multi Injection | Multiple Injection points in order: Constructor, Annotated Methods and then finally Annotated Fields |
| Composite Injection | As Multi, but an open list of Injection types that makes most sense for your components. |