Re: [picocontainer-dev] Better CAF handling

peter royal <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
On May 24, 2007, at 8:20 AM, Jörg Schaible wrote:
> peter royal wrote on Thursday, May 24, 2007 4:47 PM:
>
>> On May 24, 2007, at 4:19 AM, Jörg Schaible wrote:
>>> MutablePicoContainer mpc = new PicoBuilder() {{
>>> 	useSetterInjection(); // this is the factory !!
>>> 	addThreadSafety();
>>> 	addHiddenImplementations();
>>> 	addCaching();
>>> }}.build();
>>
>> interesting... what's up with the double-curlies?
>
> Class initializers!
>
> class X {
>   {
>     System.out.println("Running as part of object initialization");
>   }
>
> }
>
> Seldom used Java feature ;-)

without the 'static' keyword, absolutely..

so, this is interesting! i like it. worth more exploration :)

-pete

-- 
(peter.royal|osi)@pobox.com - http://fotap.org/~osi
smime.p7s (application/pkcs7-signature, 2.4 KB) - not displayed
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.