Class ElementWalker

  • Direct Known Subclasses:
    BaseElementWalker, PackageElementWalker

    public class ElementWalker
    extends java.lang.Object
    elementwalker class that allows you to traverse a dom tree starting at a given root
    • Constructor Detail

      • ElementWalker

        public ElementWalker​(IWalkerFactory _theFactory)
        Parameters:
        _theFactory - used to find the individual instances for the children
    • Method Detail

      • walkTree

        public int walkTree​(KElement e,
                            KElement trackElem)
        walk the tree starting at e.
        Parameters:
        e - the root element to walk, must not be null
        trackElem - a parallel element to e that may additionally be modified during the walk, may be null
        Returns:
        n the number of traversed elements
      • walkTreeKidsFirst

        public int walkTreeKidsFirst​(KElement e)
        walk the tree starting at e.
        Parameters:
        e - the root element to walk
        Returns:
        n the number of traversed elements
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • getFactory

        public IWalkerFactory getFactory()
        Getter for theFactory attribute.
        Returns:
        the theFactory