Package org.picocontainer
This package contains the core API for PicoContainer, a compact container for working with the dependency injection pattern.
When you use
PicoContainer for dependency injection, you create a new instance of MutablePicoContainer
,
register classes (and possibly
ComponentAdapter
s and component instances created through other means).
Object instances can then be accessed through the PicoContainer
interface. The container will create all
instances for you automatically, resolving their dependencies and order of instantiation. The default container implementation is
the DefaultPicoContainer
class.
An extensive user guide, a list of Frequently Asked Questions (FAQ) with answers and a lot more information is available from the PicoContainer website. You can also find various extensions, wrappers and utility libraries that are based on this core API there.
-
Interface Summary Interface Description Behavior<T> Behaviors modify the components created by a Injector with additional behaviorsBehaviorFactory Extends ComponentFactory to provide factory methods for BehaviorsComponentAdapter<T> A component adapter is responsible for providing a specific component instance of type <T>.ComponentFactory A component factory is responsible for creatingComponentAdapter
component adapters.ComponentLifecycle<T> ComponentMonitor A component monitor is responsible for monitoring the component instantiation and method invocation.ComponentMonitorStrategy Interface responsible for changing monitoring strategy.Converters A facade for a collection of converters that provides string-to-type conversions.Converting Interface for containers that can handle string-to-object conversion in object parameters.Disposable An interface which is implemented by components that need to dispose of resources during the shutdown of that component.InjectionFactory Injector<T> Implementers are responsible for instantiating and injecting dependancies into Constructors, Methods and Fields.LifecycleStrategy An interface which specifies the lifecycle strategy on the component instance.MutablePicoContainer This is the core interface used for registration of components with a container.NameBinding ObjectReference<T> A way to refer to objects that are stored in "awkward" places (for example inside aHttpSession
orThreadLocal
).Parameter This class provides control over the arguments that will be passed to a constructor.Parameter.Resolver Resolver is used transitarily during resolving of Parameters.PicoContainer This is the core interface for PicoContainer.PicoVisitor Interface realizing a visitor pattern forPicoContainer
as described in the GoF.Startable An interface which is implemented by components that can be started and stopped. -
Class Summary Class Description BindKey<T> Characteristics Collection of immutable properties, holding behaviour characteristics.Characteristics.ImmutableProperties Read only property set.ComponentAdapter.NOTHING DefaultPicoContainer The StandardPicoContainer
/MutablePicoContainer
implementation.DefaultPicoContainer.KnowsContainerAdapter<T> DefaultPicoContainer.LateInstance Emjection Parameter.DelegateResolver Delegate to another reolverParameter.NotResolved The Parameter cannot (ever) be resolvedParameter.ValueResolver A fixed value wrapped as a ResolverPicoBuilder Helps assembles the myriad items available to a picocontainer. -
Exception Summary Exception Description PicoClassNotFoundException PicoCompositionException Subclass ofPicoException
that is thrown when there is: - a problem initializing the container - a cyclic dependency between components occurs.PicoException Superclass for all Exceptions in PicoContainer.PicoLifecycleException PicoVerificationException Subclass ofPicoException
that is thrown when aPicoContainer
hierarchy cannot be verified.