ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Roles [WAS:Re: Restricted types: Re: Location in non-Task tasks]
Date Wed, 13 Sep 2006 11:14:07 GMT
On 9/13/06, Antoine Levy-Lambert <antoine@gmx.de> wrote:
>
> Hi,
>
> I did not see the changes. But in principle I agree with Dominique
> that a roledef should have 3 attributes :
> name, role, classname
> or can we make the role attribute optional by finding out by
> introspection whether a class is a condition, or a selector, or a ...
> In any case we should have the field role in the table storing the
> roles in memory. It is also possible that one class be both a
> condition and a selector for instance.
> In this case, the class could be bound to different names as a
> function of its role.


I do not like the idea of a role.

A class declares which Interfaces it supports - Condition, Selector
or whatever, the java compiler and java runtime enforces that.
There is no need for us to invent new ways to do this!
It is complicated - and prone to bugs both in the core ant code
and when users define them (in xml).

Peter

Regards,
> Antoine
>
>
> On Sep 13, 2006, at 2:52 AM, Dominique Devienne wrote:
>
> >> > > however we can add the @ant.type tags now for documentation?,
> >> >
> >> > Sure, provided we settle on a doc tag name, which ideally would
> >> match
> >> > the <*def> we choose. --DD
> >>
> >>
> >> @ant.type --> <typedef>
> >> @ant.task --> <taskdef>
> >> @ant.role  --> <roledef>
> >
> > Role implies (to me at least) that the name is bound to a given role,
> > like being a condition or a file selector, which would be explicitly
> > specified by name (or class name). Since your changes just bind a
> > name, without an explicit "role", it's not my favorite. I lean toward
> > <elementdef> or <tagdef> myself, the latter being my preference.
> >
> > But I'm beyond neat picking here ;-) --DD
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message