Re: [picocontainer-dev] requst for clarification

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Yes -

     public void testFoo() {
         MutablePicoContainer parent = createPicoContainer(null);
         MutablePicoContainer child = parent.makeChildContainer();
         parent.addComponent(Integer.class, 1234);
         child.addComponent(Integer.class, 5678);
         child.addComponent(NeedsTwo.class); // NeedsTwo take an  
Integer param and assigns to pub field 'two'
         assertEquals(5678, child.getComponent(NeedsTwo.class).two);
     }

However, you are alluding to a more sophisticated case than the above ?

- Paul


On Dec 1, 2007, at 4:19 AM, Konstantin Priblouda wrote:

> Do I grok it right,
>
> that  component registered by key in child
> container masks all the components with same key in
> parent container regardless of lookup modalities?
>
> ( i.e - same class etc )
>
> tia,
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> JTec quality components: http://www.pribluda.de/projects/
>
>
>        
> ______________________________________________________________________ 
> ______________
> Be a better sports nut!  Let your teams follow you
> with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/ 
> sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
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.