RE: [picocontainer-dev] caf chaining in builder (done)

Jörg Schaible <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Paul Hammant wrote on Wednesday, May 30, 2007 9:31 AM:

> Here is what it is like now :-
> 
>    MutablePicoContainer mpc = new PicoBuilder(SDI()).withBehaviors
> (caching(), threadSafe(), implHiding()).build();
> 
> After today's "Behavior" thought it was clear that there is one
> injection type as an end-node, and zero or more Behaviors fronting it.
> 
> ComponentAdapterFactory has been changed to ComponentFactory,
> subtypes of BehaviorFactory and InjectionFatcory.
> ComponentAdapter has not been renamed, but has sub-interfaces of
> InjectionAdapter and BehaviorAdapter
> 
> I think this makes sense.

Yes, as long as 

MutablePicoContainer mpc = new PicoBuilder(SDI()).withBehaviors(caching(), threadSafe(), implHiding()).build();

is a simple short cut for something like:

MutablePicoContainer mpc = new PicoBuilder(new SDIF()).withBehaviors(new CachingBahaviour(), new ThreadSafeBahaviour(), new ImplHidingBahaviour()).build();

That way you can add new DI factories or behaviours without changing the Builder.

- Jörg

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.