ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: antlib
Date Thu, 22 May 2003 10:18:07 GMT
Stefan Bodewig wrote :
> With roles, would an arbitrary implementation of ShapeInterface that
> was not bundled with the antlib and was not declared to be in role
> shape be accepted as nested element in <computearea/>?
>
> If the answer is yes, then roles would be optional and would mainly be
> used to make things more explicit, right?  This is fine with me.
>
> Stefan
>
It is perfectly possible to program ant so that roles are optional and just
make things more explicit.

Roles could be used to disambiguate situations where a component class
implements several interfaces which have a meaning for ant, say Shape and
Block for instance, and a task accepts both shapes and blocks as nested
elements.

I will gladly wait until the patches of Peter Reilly are committed before
implementing roles.
In this case, to fit to the wish of Costin to develop roles so that they
exist also outside of antlibs, I would :
1 ) create a roledef task,
2 ) add an optional role attribute to typedef,
3 ) make changes in helper classes so that if a typedef has a role assigned
to it, it is only accepted as a nested element in the add method taking the
role interface as parameter.
Antoine

Antoine



Mime
View raw message