[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    Re: Betwixt & MethodUpdaters
From:       Jason van Zyl <jvanzyl () zenplex ! com>
Date:       2002-05-31 11:28:02
[Download RAW message or body]

On Fri, 2002-05-31 at 03:42, James Strachan wrote:
> Hi Jason
> 
> From: "Jason van Zyl" <jvanzyl@zenplex.com>
> > Hi James,
> >
> > Is is possible to control at which point updaters are called with newly
> > created objects?
> >
> > In Maven the project object has a method:
> >
> > void addDistribution(Distribution distribution)
> > {
> >     distributions.add(distribution);
> > }
> >
> > But I would additionally like to place the distributions in a Map so
> > that I can subsequently look them up but it appears that the
> > distribution object added is not yet complete.
> >
> > This isn't a huge deal because I can lazily initialize the distribution
> > Map I need but I was just wondering if the addXXX() method can be
> > delayed until the object has been fully populated.
> 
> It'd be a good idea to do this by default I think.
> 
> Some hacking of the BeanCreateRule should do the trick; to move the call of
> the updater from the begin() method, called on the start of the element to
> the end() method after the bean has been completely initialized. We'd
> probably have to introduce a stack to keep track of the beans; I think one
> of the reasons I did it this way was I could avoid writing that bit of code
> ;-)
> 
> Wanna have a go or would you like me to do it?

I can take a crack at it, I might take a look at some of the refactoring
we were talking about too. But it's looking great and it's working in
Maven very nicely. I'm glad to be rid of the xo mapper: that can now be
culled and I'll work on betwixt/digester now. Thanks for getting it all
up and running with the tests!
 
> James
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic