Inversion of Control is three things: component dependencies and configuration, but also Component Lifecycle
1) Design Patterns(设计原则)
2) Inversion of Control(Martin fowler03)
3) Component Adapters()
ComponentAdapters are probably PicoContainer's most highly misunderstood (and coincidentally, most powerful) feature. They combine the power of an object factory, and an object interceptor rolled into one.
有4个功能:
第一:Instantiation and Injectors,即如何注入并创建;
第二:Post Instantiation Modification using Behaviors;
第三:Changing the default ComponentAdapter for a new PicoContainer;
第四:Changing the default ComponentAdapter when registering objects.
4) Mock Objects(测试)
5) Terminology(术语)
Spring/EJB/Servlets/Applets
7) Transparency
Parameters in its constructors can be:
Ø Behavior Factories or Component Factories(已经实验过)
Ø Lifecycle Strategies(已经实验过,但还是不清楚)
Ø Component Monitors(还没有实验过)
Ø Parent Containers of various types(已经实验过,容器结构等)
2) CommandLinePicoContainer(从命名行接口参数的封装)
3) PropertiesPicoContainer(从 properties file加载参数)
4) SystemPropertiesPicoContainer(从System Properties)
5) TransientPicoContainer(暂时存在,de-referenced shortly after use)
6) TieringPicoContainer: is the same as DefaultPicoContainer, except that child containers can only seek to locate unsatisfied injection dependencies for their immediate parent container. Their grandparents are out of bounds for dependency resolution.
PicoContainer's scope hinges on parent/child container relationships. From a PicoContainer instance you can make a child container via makeChildContainer() or addChildContainer(..).
http://www.martinfowler.com/bliki/FluentInterface.html
pico = new DefaultPicoContainer(new Synchronizing().wrap(new Caching()));
pico = new DefaultPicoContainer(new Locking().wrap(new Caching()));
(更有效)