ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Fw: Control flow (if,while,for) proposal in ant (xml based).
Date Thu, 09 Nov 2000 14:07:01 GMT
Nico Seessle <> wrote:

> How about extending the pattern of a Task to allow any task to
> become and element of a task if it allow it?

If we wanted to allow for something like this, I'd probably see it
along the lines of

public abstract class EnvelopeTask extends Task {

    //call project.createTask and do something clever with it
    public abstract Task createTask(String name);

and add a EnvelopeTaskHandler to ProjectHelper to support this.

This would allow people to write <if>, <switch>, <while> tasks with
all kinds of logic in them - and it still was inside a task, not
inside Ant.

I'd prefer a solution like this over extending control structures
internal to Ant, but I'm not really fond of it.


is probably my best answer.


View raw message