Package com.google.javascript.jscomp
Class DiagnosticGroupWarningsGuard
- java.lang.Object
-
- com.google.javascript.jscomp.WarningsGuard
-
- com.google.javascript.jscomp.DiagnosticGroupWarningsGuard
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
DiagnosticGroupPathSuppressingWarningsGuard,J2clSuppressWarningsGuard
public class DiagnosticGroupWarningsGuard extends WarningsGuard
Sets the level for a particular DiagnosticGroup.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.javascript.jscomp.WarningsGuard
WarningsGuard.Priority
-
-
Constructor Summary
Constructors Constructor Description DiagnosticGroupWarningsGuard(DiagnosticGroup group, CheckLevel level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandisables(DiagnosticGroup otherGroup)Returns whether all warnings in the given diagnostic group will be filtered out.booleanenables(DiagnosticGroup otherGroup)Returns whether any of the warnings in the given diagnostic group will be upgraded to a warning or error.CheckLevellevel(JSError error)Returns a new check level for a given error.java.lang.StringtoString()-
Methods inherited from class com.google.javascript.jscomp.WarningsGuard
getPriority
-
-
-
-
Constructor Detail
-
DiagnosticGroupWarningsGuard
public DiagnosticGroupWarningsGuard(DiagnosticGroup group, CheckLevel level)
-
-
Method Detail
-
level
public CheckLevel level(JSError error)
Description copied from class:WarningsGuardReturns a new check level for a given error. OFF - suppress it, ERROR - report as error. null means that this guard does not know what to do with the error. Null is extremely helpful when you have a chain of guards. If current guard returns null, then the next in the chain should process it.- Specified by:
levelin classWarningsGuard- Parameters:
error- a reported error.- Returns:
- what level given error should have.
-
disables
public boolean disables(DiagnosticGroup otherGroup)
Description copied from class:WarningsGuardReturns whether all warnings in the given diagnostic group will be filtered out. Used to determine which passes to skip.- Overrides:
disablesin classWarningsGuard- Parameters:
otherGroup- A group of DiagnosticTypes.- Returns:
- Whether all warnings of these types are disabled by this guard.
-
enables
public boolean enables(DiagnosticGroup otherGroup)
Description copied from class:WarningsGuardReturns whether any of the warnings in the given diagnostic group will be upgraded to a warning or error.- Overrides:
enablesin classWarningsGuard- Parameters:
otherGroup- A group of DiagnosticTypes.- Returns:
- Whether any warnings of these types are enabled by this guard.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-