org.picocontainer.visitors
Class VerifyingVisitor

java.lang.Object
  extended by org.picocontainer.visitors.AbstractPicoVisitor
      extended by org.picocontainer.visitors.TraversalCheckingVisitor
          extended by org.picocontainer.visitors.VerifyingVisitor
All Implemented Interfaces:
PicoVisitor

public class VerifyingVisitor
extends TraversalCheckingVisitor

Visitor to verify PicoContainer instances. The visitor walks down the logical container hierarchy.

Author:
Jörg Schaible

Nested Class Summary
 
Nested classes/interfaces inherited from class org.picocontainer.visitors.AbstractPicoVisitor
AbstractPicoVisitor.PicoVisitorTraversalException
 
Field Summary
 
Fields inherited from interface org.picocontainer.PicoVisitor
ABORT_TRAVERSAL, CONTINUE_TRAVERSAL
 
Constructor Summary
VerifyingVisitor()
          Construct a VerifyingVisitor.
 
Method Summary
 Object traverse(Object node)
          Traverse through all components of the PicoContainer hierarchy and verify the components.
 void visitComponentAdapter(ComponentAdapter<?> componentAdapter)
          Visit a ComponentAdapter that has to accept the visitor.
 void visitComponentFactory(ComponentFactory componentFactory)
          Visit a ComponentAdapter that has to accept the visitor.
 boolean visitContainer(PicoContainer pico)
          Visit a PicoContainer that has to accept the visitor.
 
Methods inherited from class org.picocontainer.visitors.TraversalCheckingVisitor
visitParameter
 
Methods inherited from class org.picocontainer.visitors.AbstractPicoVisitor
checkTraversal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerifyingVisitor

public VerifyingVisitor()
Construct a VerifyingVisitor.

Method Detail

traverse

public Object traverse(Object node)
                throws PicoVerificationException
Traverse through all components of the PicoContainer hierarchy and verify the components.

Specified by:
traverse in interface PicoVisitor
Overrides:
traverse in class AbstractPicoVisitor
Parameters:
node - the start node of the traversal.
Returns:
a visitor-specific value.
Throws:
PicoVerificationException - if some components could not be verified.
See Also:
PicoVisitor.traverse(java.lang.Object)

visitContainer

public boolean visitContainer(PicoContainer pico)
Description copied from class: TraversalCheckingVisitor
Visit a PicoContainer that has to accept the visitor.

Specified by:
visitContainer in interface PicoVisitor
Overrides:
visitContainer in class TraversalCheckingVisitor
Parameters:
pico - the visited container.
Returns:
CONTINUE_TRAVERSAL if the traversal should continue. Any visitor callback that returns ABORT_TRAVERSAL indicates the desire to abort any further traversal.

visitComponentAdapter

public void visitComponentAdapter(ComponentAdapter<?> componentAdapter)
Description copied from class: TraversalCheckingVisitor
Visit a ComponentAdapter that has to accept the visitor.

Specified by:
visitComponentAdapter in interface PicoVisitor
Overrides:
visitComponentAdapter in class TraversalCheckingVisitor
Parameters:
componentAdapter - the visited ComponentAdapter.

visitComponentFactory

public void visitComponentFactory(ComponentFactory componentFactory)
Description copied from class: TraversalCheckingVisitor
Visit a ComponentAdapter that has to accept the visitor.

Specified by:
visitComponentFactory in interface PicoVisitor
Overrides:
visitComponentFactory in class TraversalCheckingVisitor


Copyright © 2003-2010 Codehaus. All Rights Reserved.