avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@apache.org>
Subject Re: Nano&Pico-Container
Date Sun, 22 Jun 2003 17:37:10 GMT
On Sunday, June 22, 2003, at 08:08  AM, Leo Sutic wrote:
> [RT]: Why not use reflection to set instance variables directly?
>
>    public class Shop {
>        /**
>         * @dependency
>         */
>        StockManager stockManager;
>
>        public Shop() {
>        }
>    }
>
> And have the container use reflection to set the stockManager field
> as the component passes through the compose() stage?

That's essentially what XWork2 does, they have enabledXXX() methods 
that are used to deliver dependencies.
-pete


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message