Re: [picocontainer-dev] annotations and comments on Pico2
Paul Hammant <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Erik suggested Enums too.
The current thing I've implemented is a custom class that internally
uses properties. Props can either be addititve or mutually
exclusive. Can someone try spiking alternative solutions in baby-
steps/Pico2.x ?
- Paul
On May 22, 2007, at 1:27 PM, peter royal wrote:
> On May 19, 2007, at 4:51 PM, Paul Hammant wrote:
>> I chatted with Peter Royal* last night about adding (optional) the
>> follow syntax for any injection type (incl constructor / setter as
>> we always used to have it)....
>>
>> pico.addComponent(Foo.class, FooImpl.class).with(HIDING);
>> pico.addComponent(Bar.class, BarImpl.class).as(SINGLETON);
>
> pico.addComponent(Foo.class, FooImpl.class).with
> (hiddenImplementation());
> pico.addComponent(Bar.class, BarImpl.class).as(singleton());
>
> (hiddenImplementation and singleton are static methods on some
> helper class that can be statically imported)
>
> -pete
>
> --
> (peter.royal|osi)@pobox.com - http://fotap.org/~osi
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email