avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <Paul_Hamm...@yahoo.com>
Subject Re: ComponentManager interface
Date Mon, 11 Feb 2002 08:28:33 GMT

It is an idea, but you hint that the change of the return type is back 
"in" again.

The issue here is really Sun's JVM definition of method signature.  It 
includes the method name and params, but not the return type, thus we 
can;t overload it in that area alone.  It we could we'd be doing that 
and keeping the current interfaces, rather than considering a 
whole-scale clone as an alternative.

Our three choices again, with Gerhard's too.

(1)  Change Component to Object for lookup method

(2)  Create a new method in the same ComponentManager interface

    variations : "lookup2",  "resolve"

(3)  Clone a set of interfaces & exceptions into a new package, either 
with the same names, or not.

(4)  Create a new interface in the existing package

   e.g. GenericComponentManager 

My order of preference: 1,2,4,3.   Note that I have snuck in Stephen's 
"resolve" proposal as a variation of (2) and looking better all the time.  

PD> If Sun jumped off a cliff would you do it too ?

No, but I think that a "2" suffix is not so objectionable to get around a return type issue.

try {
  MethodNameIssue mni = (MethodNameIssue) jumpOffCliff;
} catch (ClassCastException cce) {
  sout("not the same thing");

- Paul

>after reading the last proposals and contributions
>I more and more think, this is a little bit hairy,
>hasty and "dirty".
>Why don't we branch/tag the current CVS tree and put
>this all to 5.0. That would be a clean, compatible and 
>a no confusion solution. We can start now with 5.0 and 
>don't have to mess up 4.xx!
>Ok ok, I know some of you are waiting for that feature
>and I can feel you pain. But must we therefor mess up
>our codebase?
>Just something to think about...
>  ~Gerhard
>By making things absolutely clear, people will become confused
>To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

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

View raw message