Class BaseWalker

    • Field Detail

      • depth

        protected int depth
      • log

        protected final org.apache.commons.logging.Log log
    • Constructor Detail

      • BaseWalker

        public BaseWalker()
        Parameters:
        factory -
    • Method Detail

      • walk

        public KElement walk​(KElement e,
                             KElement trackElem)
        the mother routine for walking....
        Specified by:
        walk in interface IWalker
        Parameters:
        e - the element to walk
        trackElem - a parallel element to e that may additionally be modified during the walk
        Returns:
        !=null if this element remains after walking,
        null if it was deleted and therefore the walker should skip this and all its descendants
        the element may either be trackElem or a converted element to continue with as trackElem
        See Also:
        IWalker.walk(KElement, KElement)
      • prepareWalk

        public void prepareWalk​(KElement e,
                                KElement trackElem)
        hook for guaranteed prewalk initialization
        Specified by:
        prepareWalk in interface IWalker
        Parameters:
        e -
        trackElem -
      • finalizeWalk

        public void finalizeWalk​(KElement e,
                                 KElement trackElem)
        hook for guaranteed postwalk finalization
        Specified by:
        finalizeWalk in interface IWalker
        Parameters:
        e -
        trackElem -
      • matches

        public boolean matches​(KElement e)
        this is the check whether or not to use this walker for a given element should be overwritten
        Parameters:
        e - the element to check
        Returns:
        true if matches - must be true for base
      • getDepth

        public int getDepth()
        Returns:
        the class hierarchy depth
      • getElementNames

        public VString getElementNames()
        retur the list of elements that will always be procesed by this walker
        Returns:
      • compareTo

        public int compareTo​(BaseWalker arg0)
        note the reverse order - high depth means up in list so that abstract classes get checked later
        Specified by:
        compareTo in interface java.lang.Comparable<BaseWalker>
        Parameters:
        arg0 - the other Basewalker
        Returns:
        int
        See Also:
        Comparable.compareTo(java.lang.Object)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string
        See Also:
        Object.toString()