Re: [picocontainer-dev] [Paul?] DPC.initForConfig()
Paul Hammant <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
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
Whereas ...
dpc.addComponent(NeedsString.class)
dpc.addComponent(String.class,"is it me you're looking for?");
dpc.getComponent(NeedsString.class)
// works
Is that the thing that sits uncomfortably with you ?
Regards,
- Paul
On Aug 13, 2007, at 11:34 PM, Konstantin Priblouda wrote:
>
> --- Paul Hammant <[email protected]> wrote:
>
>> Sorry Konstantin, I'm not understanding...
>>
>> Don't you think that 'Ambiguous' is clearer than
>> 'Unsatisfiable' in
>> this case ?
>
> Not really. In this case there is no dependency
> available (technically) but since current variant of
> DPC fakes 9 primitive deps it becomes "Ambiguous" (and
> I start asking myself WTF there are 11 components
> registered instead of 2)
>
> It is good idea to not to resolve config paramns by
> type, but it shall be done in APC.
>
> regards,
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> JTec quality components: http://www.pribluda.de/projects/
>
>
>
> ______________________________________________________________________
> ______________
> Got a little couch potato?
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities
> +for+kids&cs=bz
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email