org.picocontainer

Interface PicoVisitor

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

Method Summary
Objecttraverse(Object node)
Entry point for the PicoVisitor traversal.
voidvisitComponentAdapter(ComponentAdapter componentAdapter)
Visit a ComponentAdapter that has to accept the visitor.
voidvisitContainer(PicoContainer pico)
Visit a PicoContainer that has to accept the visitor.
voidvisitParameter(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

visitComponentAdapter

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

Parameters: componentAdapter the visited ComponentAdapter.

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

visitParameter

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

Parameters: parameter the visited Parameter.

Since: 1.1