public class HierarchyTraverser extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<Visitor<?>> |
visitors
The set of visitors that can perform visits of one or more of a set of
VisitKind.
|
Constructor and Description |
---|
HierarchyTraverser(Set<Visitor<?>> visitors)
Create a HierarchyTraverser that can perform visits of the specified set
of VisitKind.
|
Modifier and Type | Method and Description |
---|---|
void |
traverse(Object o,
List ancestry,
Set<VisitReport> reports,
boolean includeTimeConsuming)
Carry out the appropriate visits on an object and then traverse down the
hierarchy of its children.
|
public void traverse(Object o, List ancestry, Set<VisitReport> reports, boolean includeTimeConsuming)
o
- The object to visitancestry
- The, possibly empty, list of the ancestors (ordered parents)
of the object with the most recent ancestor being the first in
the list.reports
- The set to which to add reports generated about the object and
its descendentsincludeTimeConsuming
- Whether to include visits that are time-consuming.Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.