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
public final 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 CheckLevel
level(JSError error)
Returns a new check level for a given error.Tri
mustRunChecks(DiagnosticGroup otherGroup)
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.java.lang.String
toString()
-
Methods inherited from class com.google.javascript.jscomp.WarningsGuard
getPriority
-
-
-
-
Constructor Detail
-
DiagnosticGroupWarningsGuard
public DiagnosticGroupWarningsGuard(DiagnosticGroup group, CheckLevel level)
-
-
Method Detail
-
level
@Nullable public CheckLevel level(JSError error)
Description copied from class:WarningsGuard
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.
- Specified by:
level
in classWarningsGuard
- Parameters:
error
- a reported error.- Returns:
- what level given error should have.
-
mustRunChecks
public Tri mustRunChecks(DiagnosticGroup otherGroup)
Description copied from class:WarningsGuard
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.
- FALSE: Disables all types in the group, so it need not be checked.
- UNKNOWN: Does not affect or only partially disables the group, so checking is undecided.
- Overrides:
mustRunChecks
in classWarningsGuard
- Parameters:
otherGroup
- a group to check.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-