You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mithun Gonsalvez <mi...@gmail.com> on 2009/07/04 06:20:16 UTC

Re: Problem Reusing Condition API

Hi Dominique,

Sorry for the extremely late reply...
Thanks to your inputs, I was able to pull it off :)

Thank You,
Mithun Gonsalvez

On Wed, Jun 24, 2009 at 7:38 PM, Dominique Devienne <dd...@gmail.com>wrote:

> On Wed, Jun 24, 2009 at 5:46 AM, Mithun
> Gonsalvez<mi...@gmail.com> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>