Class WarningsGuard

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  WarningsGuard.Priority
      Priority
    • Constructor Summary

      Constructors 
      Constructor Description
      WarningsGuard()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getPriority()
      The priority in which warnings guards are applied.
      abstract CheckLevel level​(JSError error)
      Returns a new check level for a given error.
      Tri mustRunChecks​(DiagnosticGroup group)
      Do checks for `group` still need to be run if this guard is installed? TRUE: Enables one or more types in the group, so it must be checked.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WarningsGuard

        public WarningsGuard()
    • Method Detail

      • level

        @Nullable
        public abstract CheckLevel level​(JSError error)
        Returns a new check level for a given error.

        `null` means that this guard does not know what to do with the error. `null` can be used it chain multiple guards; if current guard returns null, then the next in the chain should process it.

        Parameters:
        error - a reported error.
        Returns:
        what level given error should have.
      • mustRunChecks

        public Tri mustRunChecks​(DiagnosticGroup group)
        Do checks for `group` still need to be run if this guard is installed?
        1. TRUE: Enables one or more types in the group, so it must be checked.
        2. FALSE: Disables all types in the group, so it need not be checked.
        3. UNKNOWN: Does not affect or only partially disables the group, so checking is undecided.
        Parameters:
        group - a group to check.
      • getPriority

        protected int getPriority()
        The priority in which warnings guards are applied. Lower means the guard will be applied sooner. Expressed on a scale of 1 to 100.