Re: [picocontainer-dev] annotations and comments on Pico2
Jörg Schaible <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Paul Hammant wrote:
>
> On May 20, 2007, at 3:45 PM, Erik Putrycz wrote:
>
>>
>>
>> Paul Hammant wrote:
>>> MutablePicoContainer mpc = new PicoBuilder().withCaching
>>> ().withHiddenImplementations().withSetterInjection().build(); //
>>> this one is working now
>>> MutablePicoContainer mpc = new PicoBuilder
>>> ().cachedInstances().hideImplementations().forSetterInjection
>>> ().build();
>>> MutablePicoContainer mpc = new PicoBuilder().caching
>>> ().hidden().forSDI().build();
>>> MutablePicoContainer mpc = new PicoBuilder().allSingletons
>>> ().hidden().forSDI().build();
>>>
>>> MutablePicoContainer mpc = new PicoBuilder
>>> ().cachedInstances().hideImplementations().build(); // will do CDI
>>> implicitly & also working now
>>>
>>> At the moment, the order is important. I'm sure that could be
>>> fixed though.
>> The problem of this builder is that it won't be extensible for
>> other pico modules. Otherwise, I think it is a step in the right
>> direction.
>
> Well I thought of a PicoBuilder in gems that extended (or delegates
> to) the one in core, and a NanoBuilder in nano that reimplemented it
> all (wraps) for NanoContainer as opposed to MutablePicoContainer.
Not the best way. Try to have a look at jMock2. You can introduce with that
syntax easily custom constraints and expectations ...
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email