RE: Re: [picocontainer-dev] comments on annotation code in sandbox

"Putrycz, Erik" <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Yes I can provide an example. My app has to deal with many object trees
where you have
Node parent = new None(null);
Node child = new Node(parent);

Where Node looks like:
public Node(Node parent) {
 _parent = parent;
}

In each node I want to have access to the components in the container so
I do something like
Node parent = new None(null);
_pico.injectMembers(parent);
Node child = new Node(parent);
_pico.injectMembers(child);

Erik.

-----Original Message-----
From: news [mailto:[email protected]] On Behalf Of Mauro Talevi
Sent: May 1, 2007 7:49
To: dev-qxt/[email protected]
Subject: Re: [picocontainer-dev] comments on annotation code in sandbox

Erik,

the injectDependencies(Object result, Class clazz, PicoContainer
container) method is in 
InjectingComponentAdapter and it's invoked when getComponentInstance().
Actually, it should be 
moved to the newInstance() method.

I don't quite understand the need to separate the process of dependency
injection from the objection 
instantiation/retrieval.

Can you provide a testcase that demostrates the need for the method
being the AnnotablePicoContainer 
interface?

Cheers


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