Re: [picocontainer-dev] Visitor Work

Paul Hammant <[email protected]> Sat, 21 Jun 2008 05:01:32 -0700
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Mike,

So its funny Aslak reworked the lifecycle stuff to use a visitor some  
years ago. I ended up removing it and going back to essentially the  
current design because visitation thru a tree was going to go to every  
node regardless of lifecycle strategy choices for each node.  I.e. if  
you wanted to block traversal at some scope, you could not.  Seems to  
me that a container should be able to block a number of things its  
parent is trying to do to it.

So if you were interested there is in Svn (deleted) a LifecycleVisitor.

- Paul

On Jun 20, 2008, at 9:48 PM, Michael Rimov wrote:

> Ok, here you go.  I ultimately only modified one signature:    
> boolean visitContainer(Pico).
>
> What this allows me to do is pseudo lifecycles that are implemented  
> via Visitors, and most importantly, when I have a stack of 5-6  
> containers deep, I can make sure I only apply the visitor to one  
> container.
>
> It isn’t the most efficient implementation, but it does cover what I  
> need, and is much less invasive than allowing “abort points” for  
> every visitor callback.  (Which would result in modification of the  
> accept() methods as well)
>
> Let me know if this works.
>
>                                                                                                                                                 -Mike
>
> From: Paul Hammant [mailto:[email protected]]
> Sent: Friday, June 20, 2008 3:40 PM
> To: dev-qxt/[email protected]
> Subject: Re: [picocontainer-dev] Visitor Work
>
> In change 4330 I added a method to PicoVisitor (corresponding to a  
> JIRA issue)
>
> Make your change and show us the patch ..
>
> <visitorpatch.diff>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email