Class CheckProvidesSorted

  • All Implemented Interfaces:
    NodeTraversal.Callback

    public final class CheckProvidesSorted
    extends java.lang.Object
    implements NodeTraversal.Callback
    Checks that goog.provide statements are sorted and deduplicated, exposing the necessary information to produce a suggested fix.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CheckProvidesSorted.Mode
      Operation modes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Node getFirstNode()
      Returns the node for the first recognized provide statement.
      Node getLastNode()
      Returns the node for the last recognized provide statement.
      java.lang.String getReplacement()
      Returns a textual replacement yielding a canonical version of the provides.
      boolean needsFix()
      Returns whether the provides need to be fixed, i.e., whether they are *not* already canonical.
      boolean shouldTraverse​(NodeTraversal t, Node n, Node parent)
      Visits a node in preorder (before its children) and decides whether the node and its children should be traversed.
      void visit​(NodeTraversal t, Node n, Node parent)
      Visits a node in postorder (after its children).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait