Class RecursiveElementVisitor

  • All Implemented Interfaces:
    ElementVisitor

    public class RecursiveElementVisitor
    extends java.lang.Object
    implements ElementVisitor

    Visitor pattern helper that walks the entire tree calling operations are various points in the walking process. It is a depth first traversal.

    Every visit operation is bracketted by a start/end pair making the calling points:

    • start of element
    • start each sub element
    • end of each sub element
    • end of element

    The calls before and after subElements pass in the containing Element. These calls are in addition to the start/end call on elements as part of the recursive walk.

    Usage: inherit from this class and implement startElement/endElement as needed. The ElementWalker is like implementing endElement.