Package com.google.javascript.jscomp
Class J2clSuppressWarningsGuard
- java.lang.Object
-
- com.google.javascript.jscomp.WarningsGuard
-
- com.google.javascript.jscomp.DiagnosticGroupWarningsGuard
-
- com.google.javascript.jscomp.J2clSuppressWarningsGuard
-
- All Implemented Interfaces:
java.io.Serializable
public class J2clSuppressWarningsGuard extends DiagnosticGroupWarningsGuard
A warnings guard that suppresses some warnings incompatible with J2CL.- 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 J2clSuppressWarningsGuard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
disables(DiagnosticGroup type)
Returns whether all warnings in the given diagnostic group will be filtered out.protected int
getPriority()
The priority in which warnings guards are applied.CheckLevel
level(JSError error)
Returns a new check level for a given error.-
Methods inherited from class com.google.javascript.jscomp.DiagnosticGroupWarningsGuard
enables, toString
-
-
-
-
Method Detail
-
disables
public boolean disables(DiagnosticGroup type)
Description copied from class:WarningsGuard
Returns whether all warnings in the given diagnostic group will be filtered out. Used to determine which passes to skip.- Overrides:
disables
in classDiagnosticGroupWarningsGuard
- Parameters:
type
- A group of DiagnosticTypes.- Returns:
- Whether all warnings of these types are disabled by this guard.
-
level
public CheckLevel level(JSError error)
Description copied from class:WarningsGuard
Returns 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.- Overrides:
level
in classDiagnosticGroupWarningsGuard
- Parameters:
error
- a reported error.- Returns:
- what level given error should have.
-
getPriority
protected int getPriority()
Description copied from class:WarningsGuard
The priority in which warnings guards are applied. Lower means the guard will be applied sooner. Expressed on a scale of 1 to 100.- Overrides:
getPriority
in classWarningsGuard
-
-