Package com.google.javascript.jscomp
Class DiagnosticGroup
- java.lang.Object
-
- com.google.javascript.jscomp.DiagnosticGroup
-
- All Implemented Interfaces:
java.io.Serializable
public final class DiagnosticGroup extends java.lang.Object implements java.io.Serializable
Group a set of related diagnostic types together, so that they can be toggled on and off as one unit.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DiagnosticGroup(DiagnosticGroup... groups)
Create a composite group.DiagnosticGroup(DiagnosticType... types)
Create a group that matches all errors of the given types.DiagnosticGroup(java.lang.String name, DiagnosticGroup... groups)
Create a composite group.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DiagnosticGroup
forType(DiagnosticType type)
Create a diagnostic group that matches only the given type.com.google.common.collect.ImmutableSet<DiagnosticType>
getTypes()
Returns all the types in this group.boolean
matches(DiagnosticType type)
Returns whether the given type matches a type in this group.boolean
matches(JSError error)
Returns whether the given error's type matches a type in this group.java.lang.String
toString()
-
-
-
Constructor Detail
-
DiagnosticGroup
public DiagnosticGroup(DiagnosticType... types)
Create a group that matches all errors of the given types.
-
DiagnosticGroup
public DiagnosticGroup(DiagnosticGroup... groups)
Create a composite group.
-
DiagnosticGroup
public DiagnosticGroup(java.lang.String name, DiagnosticGroup... groups)
Create a composite group.
-
-
Method Detail
-
forType
public static DiagnosticGroup forType(DiagnosticType type)
Create a diagnostic group that matches only the given type.
-
matches
public boolean matches(JSError error)
Returns whether the given error's type matches a type in this group.
-
matches
public boolean matches(DiagnosticType type)
Returns whether the given type matches a type in this group.
-
getTypes
public com.google.common.collect.ImmutableSet<DiagnosticType> getTypes()
Returns all the types in this group.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-