public class ComposeWarningsGuard extends WarningsGuard
| Modifier and Type | Class and Description |
|---|---|
private static class |
ComposeWarningsGuard.GuardComparator |
WarningsGuard.Priority| Modifier and Type | Field and Description |
|---|---|
private boolean |
demoteErrors |
private java.util.Comparator<WarningsGuard> |
guardComparator |
private java.util.TreeSet<WarningsGuard> |
guards |
private int |
numberOfAdds |
private java.util.Map<WarningsGuard,java.lang.Integer> |
orderOfAddition |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ComposeWarningsGuard(java.util.List<WarningsGuard> guards) |
ComposeWarningsGuard(WarningsGuard... guards) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addGuard(WarningsGuard guard) |
private void |
addGuards(java.lang.Iterable<WarningsGuard> guards) |
boolean |
disables(DiagnosticGroup group)
Returns whether all warnings in the given diagnostic group will be
filtered out.
|
boolean |
enables(DiagnosticGroup group)
Determines whether this guard will "elevate" the status of any disabled
diagnostic type in the group to a warning or an error.
|
(package private) java.util.List<WarningsGuard> |
getGuards() |
CheckLevel |
level(JSError error)
Returns a new check level for a given error.
|
(package private) ComposeWarningsGuard |
makeEmergencyFailSafeGuard()
Make a warnings guard that's the same as this one but demotes all
errors to warnings.
|
protected ComposeWarningsGuard |
makeNonStrict()
Make a warnings guard that's the same as this one but with
all escalating guards turned down.
|
java.lang.String |
toString() |
getPriorityprivate static final long serialVersionUID
private final java.util.Map<WarningsGuard,java.lang.Integer> orderOfAddition
private int numberOfAdds
private final java.util.Comparator<WarningsGuard> guardComparator
private boolean demoteErrors
private final java.util.TreeSet<WarningsGuard> guards
public ComposeWarningsGuard(java.util.List<WarningsGuard> guards)
public ComposeWarningsGuard(WarningsGuard... guards)
void addGuard(WarningsGuard guard)
private void addGuards(java.lang.Iterable<WarningsGuard> guards)
public CheckLevel level(JSError error)
WarningsGuardlevel in class WarningsGuarderror - a reported error.public boolean disables(DiagnosticGroup group)
WarningsGuarddisables in class WarningsGuardgroup - A group of DiagnosticTypes.public boolean enables(DiagnosticGroup group)
enables in class WarningsGuardgroup - A group of DiagnosticTypes.java.util.List<WarningsGuard> getGuards()
ComposeWarningsGuard makeEmergencyFailSafeGuard()
protected ComposeWarningsGuard makeNonStrict()
WarningsGuardmakeNonStrict in class WarningsGuardpublic java.lang.String toString()
toString in class java.lang.Object