|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.jscomp.WarningsGuard
com.google.javascript.jscomp.WhitelistWarningsGuard
public abstract class WhitelistWarningsGuard
An extension of WarningsGuard
that provides functionality to maintain
a list of warnings (white-list). It is subclasses' responsibility to decide
what to do with the white-list by implementing the level
function.
Warnings are defined by the name of the js file and the first line of
warnings description.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.javascript.jscomp.WarningsGuard |
---|
WarningsGuard.Priority |
Constructor Summary | |
---|---|
WhitelistWarningsGuard(Set<String> whiteList)
This class depends on an input set that contains the white-list. |
Method Summary | |
---|---|
protected boolean |
containWarning(String formattedWarning)
Determines whether a given warning is included in the white-list. |
static String |
formatWarning(JSError error)
|
static String |
formatWarning(JSError error,
boolean withLineNumber)
|
static String |
getFirstLine(String warning)
|
int |
getPriority()
The priority in which warnings guards are applied. |
static Set<String> |
loadWhitelistedJsWarnings(File file)
Loads legacy warnings list from the file. |
protected static Set<String> |
loadWhitelistedJsWarnings(com.google.common.io.InputSupplier<InputStreamReader> supplier)
Loads legacy warnings list from the file. |
Methods inherited from class com.google.javascript.jscomp.WarningsGuard |
---|
disables, enables, level |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WhitelistWarningsGuard(Set<String> whiteList)
whiteList
- The set of js-warnings that are white-listed. This is
expected to have similar format as formatWarning(JSError)
.Method Detail |
---|
protected boolean containWarning(String formattedWarning)
formattedWarning
- the warning formatted by formatWarning
public int getPriority()
WarningsGuard
getPriority
in class WarningsGuard
public static Set<String> loadWhitelistedJsWarnings(File file)
protected static Set<String> loadWhitelistedJsWarnings(com.google.common.io.InputSupplier<InputStreamReader> supplier)
public static String formatWarning(JSError error)
public static String formatWarning(JSError error, boolean withLineNumber)
public static String getFirstLine(String warning)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |