com.google.javascript.jscomp
Class ShowByPathWarningsGuard
java.lang.Object
com.google.javascript.jscomp.WarningsGuard
com.google.javascript.jscomp.ShowByPathWarningsGuard
- All Implemented Interfaces:
- Serializable
public class ShowByPathWarningsGuard
- extends WarningsGuard
Control whether warnings should be restricted or suppressed for specified
paths.
- See Also:
- Serialized Form
Nested Class Summary |
static class |
ShowByPathWarningsGuard.ShowType
Controls whether warnings should be restricted to a specified path or
suppressed within the specified path. |
Method Summary |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShowByPathWarningsGuard
public ShowByPathWarningsGuard(String checkWarningsOnlyForPath)
ShowByPathWarningsGuard
public ShowByPathWarningsGuard(String[] checkWarningsOnlyForPath)
ShowByPathWarningsGuard
public ShowByPathWarningsGuard(String path,
ShowByPathWarningsGuard.ShowType showType)
ShowByPathWarningsGuard
public ShowByPathWarningsGuard(String[] paths,
ShowByPathWarningsGuard.ShowType showType)
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.
- Specified by:
level
in class WarningsGuard
- 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 class WarningsGuard