Package org.revapi

Interface DifferenceTransform.TraversalTracker<E extends Element<E>>

  • Type Parameters:
    E -
    Enclosing interface:
    DifferenceTransform<E extends Element<?>>

    public static interface DifferenceTransform.TraversalTracker<E extends Element<E>>
    Some more sophisticated transforms may need to track the traversal of the element forest. They can return an implementation of this interface to help them do that.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void endElements​(E oldElement, E newElement)
      Called when the analyzer finished the traversal of the two elements, that is after the startElements(Element, Element) and this method has been called on all the children of the two elements.
      default void endTraversal()
      Called when the analysis finished traversing all the elements from the given api analyzer.
      default boolean startElements​(E oldElement, E newElement)
      Called when the analyzer starts to traverse the two elements.
    • Method Detail

      • startElements

        default boolean startElements​(@Nullable
                                      E oldElement,
                                      @Nullable
                                      E newElement)
        Called when the analyzer starts to traverse the two elements. The traversal is performed in the depth-first manner, so all child elements of the two elements are processed before the endElements(Element, Element) method is called with the same pair of elements
        Parameters:
        oldElement - the old element, if any, being compared to the new element
        newElement - the new element, if any, being compared to the old element
        Returns:
        true if the difference requires descending into the children even if one of the elements is not present (is null), false otherwise
      • endElements

        default void endElements​(@Nullable
                                 E oldElement,
                                 @Nullable
                                 E newElement)
        Called when the analyzer finished the traversal of the two elements, that is after the startElements(Element, Element) and this method has been called on all the children of the two elements.
        Parameters:
        oldElement - the old element, if any, being compared to the new element
        newElement - the new element, if any, being compared to the old element
      • endTraversal

        default void endTraversal()
        Called when the analysis finished traversing all the elements from the given api analyzer.