org.picocontainer
Interface PicoVisitor

All Known Implementing Classes:
AbstractPicoVisitor

public interface PicoVisitor

Interface realizing a visitor pattern for PicoContainer as described in the GoF. The visitor should visit the container, its children, all registered ComponentAdapter instances and all instantiated components.

Since:
1.1
Version:
$Revision: 1753 $
Author:
Aslak Hellesøy, Jörg Schaible

Method Summary
 Object traverse(Object node)
          Entry point for the PicoVisitor traversal.
 void visitComponentAdapter(ComponentAdapter componentAdapter)
          Visit a ComponentAdapter that has to accept the visitor.
 void visitContainer(PicoContainer pico)
          Visit a PicoContainer that has to accept the visitor.
 void visitParameter(Parameter parameter)
          Visit a Parameter that has to accept the visitor.
 

Method Detail

traverse

public Object traverse(Object node)
Entry point for the PicoVisitor traversal. The given node is the first object, that is asked for acceptance. Only objects of type PicoContainer, ComponentAdapter, or Parameter are valid.

Parameters:
node - the start node of the traversal.
Returns:
a visitor-specific value.
Throws:
IllegalArgumentException - in case of an argument of invalid type.
Since:
1.1

visitContainer

public void visitContainer(PicoContainer pico)
Visit a PicoContainer that has to accept the visitor.

Parameters:
pico - the visited container.
Since:
1.1

visitComponentAdapter

public void visitComponentAdapter(ComponentAdapter componentAdapter)
Visit a ComponentAdapter that has to accept the visitor.

Parameters:
componentAdapter - the visited ComponentAdapter.
Since:
1.1

visitParameter

public void visitParameter(Parameter parameter)
Visit a Parameter that has to accept the visitor.

Parameters:
parameter - the visited Parameter.
Since:
1.1


Copyright © 2003-2007 Codehaus. All Rights Reserved.