[EMAIL PROTECTED] 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
