Re: [picocontainer-dev] [Paul?] DPC.initForConfig()
Konstantin Priblouda <kpriblouda-/[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Paul Hammant <[email protected]> wrote: > You're not convincing me dude :-) > > Can we talk in terms of end-user code? show me a > code fragment that > does something that you do not like. > > Like this ... > > public class NeedsString { > public NeedsString(String foo) { .. } > } > dpc.addComponent(NeedsString.class) > dpc.addConfig("hello","is it me you're looking > for?"); > dpc.getComponent(NeedsString.class) > // barfs with ambiguous I would prefer this as unsatisfied. > Whereas ... > > dpc.addComponent(NeedsString.class) > dpc.addComponent(String.class,"is it me you're > looking for?"); > dpc.getComponent(NeedsString.class) > // works That's correct. > Is that the thing that sits uncomfortably with you ? Yes. It seems that we introduced 3rd kind artifact inside container - config entry ( first two were: component and instance ) and it is going to stay. So we need to formally define that most distonct property of config entry is: - newer match by type, only by name ( hack with ambiguous results from this requirement ) This calls for a new type of component adapter ;) regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- JTec quality components: http://www.pribluda.de/projects/ ____________________________________________________________________________________ Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. http://autos.yahoo.com/carfinder/ --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email