public class VerifyingVisitor extends TraversalCheckingVisitor
PicoContainer
instances. The visitor walks down the logical container hierarchy.Modifier and Type | Class and Description |
---|---|
private class |
VerifyingVisitor.ComponentAdapterCollector |
Modifier and Type | Field and Description |
---|---|
private PicoVisitor |
componentAdapterCollector |
private PicoContainer |
currentPico |
private java.util.List |
nestedVerificationExceptions |
private java.util.Set |
verifiedComponentAdapters |
Constructor and Description |
---|
VerifyingVisitor()
Construct a VerifyingVisitor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
traverse(java.lang.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 |
visitContainer(PicoContainer pico)
Visit a
PicoContainer that has to accept the visitor. |
visitParameter
checkTraversal
private final java.util.List nestedVerificationExceptions
private final java.util.Set verifiedComponentAdapters
private final PicoVisitor componentAdapterCollector
private PicoContainer currentPico
public java.lang.Object traverse(java.lang.Object node) throws PicoVerificationException
PicoContainer
hierarchy and verify the components.traverse
in interface PicoVisitor
traverse
in class AbstractPicoVisitor
node
- the start node of the traversal.PicoVerificationException
- if some components could not be verified.PicoVisitor.traverse(java.lang.Object)
public void visitContainer(PicoContainer pico)
PicoVisitor
PicoContainer
that has to accept the visitor.visitContainer
in interface PicoVisitor
visitContainer
in class TraversalCheckingVisitor
pico
- the visited container.public void visitComponentAdapter(ComponentAdapter componentAdapter)
PicoVisitor
ComponentAdapter
that has to accept the visitor.visitComponentAdapter
in interface PicoVisitor
visitComponentAdapter
in class TraversalCheckingVisitor
componentAdapter
- the visited ComponentAdapter.