Re: [picocontainer-dev] comments on annotation code in sandbox
Mauro Talevi <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Putrycz, Erik wrote:
> I believe, Mauro did some changes to my original code that I submitted..
>
> There is one that bothers me for my current project. I originally had a
> method in the extended interface:
>
>
>
> public abstract void injectMembers(Object result);
>
>
>
> This method is extremely useful if you want to manually create instances
> (and process your own constructor code) and only after, process the
> inject annotations.
>
> I was using this in object trees. I still want to keep my own logic in
> the constructors and only after process the annotations using this method.
>
> Any objections for putting it back? (will submit a patch soon)
>
>
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