Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2
-
Fix Version/s: 1.2
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I couldn't find anything similar to this in Pico's code base.
Modivation: Make a simple PicoVisitor that allows for focusing on only one (or more) types of components.
Using the included BasePicoVisitor, the following code that collects all Containers in a hierarchy becomes possible:
//Collect a list of all containers in the pico
final List allContainers = new ArrayList();
PicoVisitor testingVisitor = new BasePicoVisitor() {
public void visitContainer(PicoContainer pico)
};
testingVisitor.traverse(rootPico);
HTH!
-Mike (R)
Activity
Jörg Schaible
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Joerg Schaible [ joehni ] |
Jörg Schaible
made changes -
Environment | ||
Fix Version/s | 1.2 [ 11330 ] |
Mauro Talevi
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
Micheal - path has been applied with BasePicoVisitor renamed to TraversalCheckingVisitor.
Many thanks!