Package com.google.javascript.jscomp
Class DiagnosticType
- java.lang.Object
-
- com.google.javascript.jscomp.DiagnosticType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DiagnosticType>
public final class DiagnosticType extends java.lang.Object implements java.lang.Comparable<DiagnosticType>, java.io.Serializable
The type of a compile or analysis error.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringformatThe default way to format errors.java.lang.StringkeyThe error type.CheckLevellevelThe default reporting level for this diagnostic
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DiagnosticType diagnosticType)static DiagnosticTypedisabled(java.lang.String name, java.lang.String descriptionFormat)Create a DiagnosticType at level CheckLevel.OFFbooleanequals(java.lang.Object type)static DiagnosticTypeerror(java.lang.String name, java.lang.String descriptionFormat)Create a DiagnosticType at level CheckLevel.ERRORinthashCode()static DiagnosticTypemake(java.lang.String name, CheckLevel level, java.lang.String descriptionFormat)Create a DiagnosticType at a given CheckLevel.java.lang.StringtoString()static DiagnosticTypewarning(java.lang.String name, java.lang.String descriptionFormat)Create a DiagnosticType at level CheckLevel.WARNING
-
-
-
Field Detail
-
key
public final java.lang.String key
The error type. Used as the BugPattern and BugInstance types by BugBot's XML
-
format
public final java.lang.String format
The default way to format errors. The style of format is java.text.MessageFormat.
-
level
public final CheckLevel level
The default reporting level for this diagnostic
-
-
Method Detail
-
error
public static DiagnosticType error(java.lang.String name, java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.ERROR- Parameters:
name- An identifierdescriptionFormat- A format string- Returns:
- A new DiagnosticType
-
warning
public static DiagnosticType warning(java.lang.String name, java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.WARNING- Parameters:
name- An identifierdescriptionFormat- A format string- Returns:
- A new DiagnosticType
-
disabled
public static DiagnosticType disabled(java.lang.String name, java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.OFF- Parameters:
name- An identifierdescriptionFormat- A format string- Returns:
- A new DiagnosticType
-
make
public static DiagnosticType make(java.lang.String name, CheckLevel level, java.lang.String descriptionFormat)
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
public boolean equals(java.lang.Object type)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(DiagnosticType diagnosticType)
- Specified by:
compareToin interfacejava.lang.Comparable<DiagnosticType>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-