So would Inner be able to have Qi4j injection in constructors? On Fri, Aug 19, 2011 at 2:24 PM, Rickard Öberg <[email protected]> wrote: > Hi, > > While working on some DCI code I had the need to be able to instantiate > instances of inner classes. This would normally not work since the "outer > instance" is required for the constructor to work. I got around this, and so > now you can do this: > class Outer > { > @Uses Inner inner; > > class Inner > { > } > } > -- > Qi4j will instantiate the Inner class with the Outer instance as constructor > argument while trying to inject the @Uses dependency in Outer. It obviously > doesn't work if you use @Uses in a constructor dependency, only for > fields+method injection. > > Committed and pushed in v2.0 branch. > > /Rickard > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev >
-- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

