ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: Problem Reusing Condition API
Date Wed, 24 Jun 2009 14:08:31 GMT
On Wed, Jun 24, 2009 at 5:46 AM, Mithun
Gonsalvez<> wrote:
>> This adds a nested <condition> tag, while you add a <equals> one.
>> You need to have an add() method instead. I don't recall the exact rules though.
>  The <condition> tag when evaluated to true, will set a property [which i
> want to avoid]
>  Instead i would like to evaluate the conditions and take another action.
>  Currently I am adding methods specific to different Condition Types, as you
> have mentioned.

That's what I was trying to tell you, but terminology got in the way.
There's <condition> the task (ConditionTask), and there's Condition
the interface implemented by all conditions.

If you have a void add(Condition c) method in your task, this makes your
task accept any nested tags with 'is a' Condition automatically. That's
one of the newer introspection rule added by Peter Reilly in Ant 1.6,
which is more generic that the older addTag/addConfiguredTag rules,
which only accept a nested <tag>. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message