Ok, thanks for your feedback. I'll look into if the second case is deterministic or if it may select the other constructor...
On Fri, Sep 23, 2011 at 5:48 PM, Rickard Öberg <[email protected]> wrote: > On 9/23/11 11:23 , Niclas Hedhman wrote: >> >> There is then an interesting "side problem"... >> >> See ObjectBuilderFactoryTest, the following class could then be >> created by a 'created' anyObject in the second constructor, instead of >> with the first constructor. >> >> I am not sure how we are going to define the exact and predictable >> semantics here... I'll wait for Rickard's thoughts, and meanwhile >> commit the cleaned up 'develop' branch. >> >> public static final class ManyConstructorObject >> { >> AnyObject anyObject; >> Module module; >> >> public ManyConstructorObject( @Structure Module module ) >> { >> this.module = module; >> } >> >> public ManyConstructorObject( @Uses AnyObject anyObject, >> @Structure Module module ) >> { >> this.anyObject = anyObject; >> this.module = module; >> } >> } > > Good point! Like I said in previous post, in general I *want* AnyObject to > be instantiated. Here, it should select the second one if the model for > ManyConstructorObject can "see" AnyObject, given the visibility rules. > > /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

