Dominique, you should love the current antlib proposal more of what 
you are arguing is acomplish there, maybe with a little twist. :-)

> From: Dominique Devienne [mailto:[EMAIL PROTECTED]
> 
> Let's turn around your question: Tell me of a (string) role 
> (beside the
> special task/type cases) that would not be an interface? What 
> good a bean
> is, if it's not of an expected Java type? What method or 
> field are you going
> to use/call on it?
> 

This is exactly the point, we should try to type things. Roles 
are this typed interfaces expected by the set/add method. The component 
being declared of a particular role, may or may not implement the 
interface. If it does cool; if not an adaptor will be used to bridge the gap.
It is upto the adaptor to decide if the bean is compatible or not.

The guy writing the container (the thing with the set/add methods) does not
have to deal with introspection or anything of that. As s/he shouldn't.
But by allowing adaptors someone can take some cool object and bridge it.

> I agree with Costin, all tasks/types become simply beans. You 
> should be able
> to use any one of these beans in any place it's suitable to 
> use it, i.e. any
> time the Java type/role requested is part of the bean's type (in the
> isAssigneableFrom() sense).
> 

So, since now this objects come from somewhere else, if it is not typed
somehow, any object expecting an instance of the role need to do introspection 
by hand. Not good.

Jose

Reply via email to