ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: JavaFront update: TagBuilder
Date Fri, 31 Oct 2008 10:49:26 GMT
On Fri, 31 Oct 2008, Gilles Scokart <gscokart@gmail.com> wrote:

> 2008/10/30 Stefan Bodewig <bodewig@apache.org>:
>>    public void hello() {
>>        TagBuilder.forProject(p)
>>            .newTag("echo")
>>            .withAttribute("message", "Hello, ${world}!")
>>            .execute();
>>    }
> 
> Some alternatives  :
> 
> public void hello() {
>       EchoTask echo = TagBuilder.create(EchoTask.class , p);
>       echo.setMessage("Hello, ${world}!");
>       echo.execute();
> }

TagBuilder uses UnknownElement which means it can resolve task
implementations, typedefs and so on.  Your example wouldn't resolve
properties, BTW.

In current svn it reads

EchoBuilder.echoMessage(p, "Hello, ${world}!");

Stefan

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


Mime
View raw message