James Strachan wrote:
Agreed. It should be pretty easy to do - fancy having a go? The existing
BeanTag and BeanPropertyTag do almost all you need - we'd just need the
BeanPropertyTag to be able to optionally support addFoo(Foo) methods by
invoking the no-arg constructor of Foo - right now it just uses the
createFoo() pattern.
I have already started to do it. In what format do you want the changes?

Then you could create your own library, reuse the BeanTag if you wish for
all your 'root' elements (the BeanSource tags) and then BeanPropertyTag can
handle all the nested properties.



from ant user manual:
...
Now you have a class NestedElement that is supposed to be used for your
nested <inner> elements, you have three options:

   1. public NestedElement createInner()
   2. public void addInner(NestedElement anInner)
   3. public void addConfiguredInner(NestedElement anInner)

What is the difference?

Option 1 makes the task create the instance of NestedElement, there are
no restrictions on the type. For the options 2 and 3, Ant has to create
an instance of NestedInner before it can pass it to the task, this
means, NestedInner must have a public no-arg constructor. This is the
only difference between options 1 and 2.

BTW there looks like a typo in the above; NestedInner -> NestedElement.
true. Bug request against ant.. well, maybe some other time..

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to