ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: svn commit: r568040 - /ant/core/trunk/WHATSNEW
Date Tue, 21 Aug 2007 14:13:14 GMT
On 8/21/07, Peter Reilly <peter.kitt.reilly@gmail.com> wrote:
> On 8/21/07, Dominique Devienne <ddevienne@gmail.com> wrote:
> > On 8/21/07, peterreilly@apache.org <peterreilly@apache.org> wrote:
> > > Modified: ant/core/trunk/WHATSNEW
> > >
> > > +  means that tasks may now have nested conditions just by implementing
> > > +  the Condition interface, rather than extending ConditionBase.
> >
> > I'm not sure I'm following here Peter. How does implementing Condition
> > (which has only an eval() method) translate into accepting any nested
> > conditions?
>
>
> It means that one can do:
>   public class Example {
>       List<Condition> conditions ;
>       public void add(Condition c) {
>           conditions.add(c);
>       }
>    }
> and pick up conditions like and, or etc.
> up to now, one has to extend conditionBase to do this,

OK, makes sense now, thanks. One still has to accept nested elements
of a given type, as usual, and implementing Condition for Example is
not necessary, and unrelated. For a moment there I thought some new
magic had crept into Ant ;-)

PS: It's put the composed condition into an And or Or condition rather
than a List.

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


Mime
View raw message