commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject [digester] BeanPropertySetterRule: why wait until end to set property?
Date Sat, 12 Feb 2005 12:14:55 GMT
Hi all [esp. Robert Donkin],

The BeanPropertySetterRule takes the body content of an xml element and
calls a property setter method on the object on the top of the stack, eg
   <name>myname</name>
causes setName("myname") to be called.

My question is: why does BeanPropertySetterRule wait until the end()
method to actually invoke the setter method, when it could invoke the
setter method from the rule's body(..) method?

I'm considering having digester2 make the call direct from body; it's
easier to implement and I can't see any potential problems. After all,
SetPropertiesRule calls the setter methods from begin()...


The original author of this Rule appears to be Robert Donkin. Robert,
can you remember code from Nov 2001? :-)

Thanks,

Simon



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


Mime
View raw message