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() |
getPriority
private 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)
WarningsGuard
level
in class WarningsGuard
error
- a reported error.public boolean disables(DiagnosticGroup group)
WarningsGuard
disables
in class WarningsGuard
group
- A group of DiagnosticTypes.public boolean enables(DiagnosticGroup group)
enables
in class WarningsGuard
group
- A group of DiagnosticTypes.java.util.List<WarningsGuard> getGuards()
ComposeWarningsGuard makeEmergencyFailSafeGuard()
protected ComposeWarningsGuard makeNonStrict()
WarningsGuard
makeNonStrict
in class WarningsGuard
public java.lang.String toString()
toString
in class java.lang.Object