avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antti Koivunen <anryo...@users.sourceforge.net>
Subject Re: Resolver package--Please post your thoughts
Date Thu, 14 Feb 2002 04:13:04 GMT
Paulo,

I see your point, using Object keys would naturally allow maximum 
flexibility. However, the following operation is well defined:

   MyComponent mc = (MyComponent) m.lookup("com.domain.MyComponent");

Custom Object keys would be perfect for one application, but how about 
when we start switching container and component implementations?

(: A ;)

Paulo Gaspar wrote:
> Antti,
> 
> Building a String key can get REALLY complicated. I am not sure if
> it really is a simplification.
> 
> OTOH, if you know how to implement equals() and hashCode() methods,
> you can build efficient and non-coliding complex keys with ease...
> ...but then the key parameter should just be a
>    java.lang.Object
> 
> 
> Have fun,
> Paulo Gaspar
> 


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message