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
FieldsModifier and TypeFieldDescriptionfinal CheckLevelDefault levelfinal MessageFormatThe default way to format errorsfinal StringThe error type.Reporting level, initially the defaultLevel but may be changed. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(DiagnosticType diagnosticType) static DiagnosticTypeCreate a DiagnosticType at level CheckLevel.OFFbooleanstatic DiagnosticTypeCreate a DiagnosticType at level CheckLevel.ERRORinthashCode()static DiagnosticTypemake(String name, CheckLevel level, String descriptionFormat) Create a DiagnosticType at a given CheckLevel.toString()static DiagnosticTypeCreate 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:
compareToin interfaceComparable<DiagnosticType>
-
toString
-