avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Class rather than ROLE?
Date Sat, 26 Jul 2003 09:03:10 GMT
Marcus Crafter wrote:
>
>
> Since ROLE is the classes FQN, why not just specify the Class
> object itself
> like:
>
> interface Service {
> 	// methods
> }
>
> Service s = (Service) m_manager.lookup(Service.class);
>
> I know this discussion is not new - just wondering what the advantage is
> with the first approach?
>
The string approach is more flexible; if you have more than one
implementation
for your role (like e.g. the cocoon generators etc.) then you have
not a one-to-one relationship between the Class and the role string.

Carsten


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


Mime
View raw message