ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cos...@costin.dnt.ro>
Subject Re: Ant Principles
Date Wed, 19 Apr 2000 21:34:46 GMT
rubys@us.ibm.com wrote:

> .duncan wrote:
> > Good point about using addXXX instead of setXXX due to multiple
> > elements.
>
> Sigh.  The currently implemented design pattern is:
>    void setXxxx(String value);      // attributes
>    Object createXxxxx();       // entities
>    void addText(String value);      // text
>
> The current proposal (as near as I can follow) is:
>    void setXxxx(String value);      // attributes
>    void addXxxx(<ObjectType> value);// entities
>    void ???Text(String value);      // text

I would vote for the second or both.

Arguments for addXxxx() -> you can use sub-classes.

I know tomcat is a different story, but the patterns used for configuration
are similar - and addXxx() is required in order to support elements
that have different implementation but same interface/parent.

Even if ant may not need that feature - it's better to use something that
is more generic.  It is also possible to implement both createXxxx() and
addXxxx() .

Costin


Mime
View raw message