Package com.google.javascript.jscomp
Class DiagnosticType
java.lang.Object
com.google.javascript.jscomp.DiagnosticType
- All Implemented Interfaces:
Serializable
,Comparable<DiagnosticType>
The type of a compile or analysis error.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal CheckLevel
Default levelfinal MessageFormat
The default way to format errorsfinal String
The error type.Reporting level, initially the defaultLevel but may be changed. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(DiagnosticType diagnosticType) static DiagnosticType
Create a DiagnosticType at level CheckLevel.OFFboolean
static DiagnosticType
Create a DiagnosticType at level CheckLevel.ERRORint
hashCode()
static DiagnosticType
make
(String name, CheckLevel level, String descriptionFormat) Create a DiagnosticType at a given CheckLevel.toString()
static DiagnosticType
Create a DiagnosticType at level CheckLevel.WARNING
-
Field Details
-
key
The error type. Used as the BugPattern and BugInstance types by BugBot's XML -
format
The default way to format errors -
defaultLevel
Default level -
level
Reporting level, initially the defaultLevel but may be changed.
-
-
Method Details
-
error
Create a DiagnosticType at level CheckLevel.ERROR- Parameters:
name
- An identifierdescriptionFormat
- A format string- Returns:
- A new DiagnosticType
-
warning
Create a DiagnosticType at level CheckLevel.WARNING- Parameters:
name
- An identifierdescriptionFormat
- A format string- Returns:
- A new DiagnosticType
-
disabled
Create a DiagnosticType at level CheckLevel.OFF- Parameters:
name
- An identifierdescriptionFormat
- A format string- Returns:
- A new DiagnosticType
-
make
Create a DiagnosticType at a given CheckLevel.- Parameters:
name
- An identifierlevel
- Either CheckLevel.ERROR or CheckLevel.WARNINGdescriptionFormat
- A format string- Returns:
- A new DiagnosticType
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<DiagnosticType>
-
toString
-