> In a word no. Interfaces that define methods to get at data are just
> syntactic sugar. ie Whats the difference between
>
> 1. (String)context.get( "name.key" );
> 2. ((NameContext)context).getName();
As I believe I have repeatedly pointed out, these are not equivalent. In
the latter case, the context is cast to a particular type, which means that
it must have an an inheritance relationship with the desired type. In the
latter case, the context simply needs to have a reference to a suitable
object.
This extends to objects that provide services, not just simple data types.
IMO, the access mechanism provided to components should be DECOUPLING from
implementations, not COUPLING via inheritance.
--- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>