> It looks good, but I really do not like the mass of castings begin done.

The ability to do the cast requires an IS-A relationship.  I would prefer
something like:

     T t = (T) context.get(T.class);

and I believe that this better satisfies your examples, as well.  There is
nothing here that talks about implementation.  It simply says that a context
can have multiple interfaces, and that there is a method on the context by
which to acquire a specific one.

This is just a strawman.  I've left out exception/error handling, and well
as a .has(Class) method, and I'm not married to the idea that this is a
Context method, although I believe that to be the right place.

Workable?  :-)

        --- Noel


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to