[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Moving microcontainer -> kernel

alesj do-not-reply at jboss.com
Wed May 27 11:44:23 EDT 2009


"david.lloyd at jboss.com" wrote : 
  | Of course you do.  The name is a String so why support anything else?  And even if you do decide to support something like ObjectName or whatever, you should use overloading for that purpose.  It doesn't make sense to allow Object.  It implies that I can pass in a HashMap, or a Socket, or an AudioFileFormat, or ...
No I don't. ;-) The name is definitely not just a String.
Although I see where you're aiming, but there is more to it then just overloading.
And exactly the notion of having no explicit type is what makes it possible to:
* handle contextual injection with a single lookup method
* support Guice Key and other impl details
* legacy ObjectName as key/name
* ...

And if AudioFileFormat makes you happy, be my guest. :-)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233662#4233662

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233662



More information about the jboss-dev-forums mailing list