ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject Re: JavaFront update: TagBuilder
Date Fri, 31 Oct 2008 10:03:57 GMT
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();
}

Or:

public void hello() {
    TagBuilder.execute(new EchoTask() {{
          setMessage("Hello, ${world}!");
    }});
}




-- 
Gilles Scokart

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


Mime
View raw message