public class DiagnosticType extends java.lang.Object implements java.lang.Comparable<DiagnosticType>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
CheckLevel |
defaultLevel
Default level
|
java.text.MessageFormat |
format
The default way to format errors
|
java.lang.String |
key
The error type.
|
CheckLevel |
level
Reporting level, initially the defaultLevel but may be changed.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DiagnosticType diagnosticType) |
static DiagnosticType |
disabled(java.lang.String name,
java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.OFF
|
boolean |
equals(java.lang.Object type) |
static DiagnosticType |
error(java.lang.String name,
java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.ERROR
|
int |
hashCode() |
static DiagnosticType |
make(java.lang.String name,
CheckLevel level,
java.lang.String descriptionFormat)
Create a DiagnosticType at a given CheckLevel.
|
java.lang.String |
toString() |
static DiagnosticType |
warning(java.lang.String name,
java.lang.String descriptionFormat)
Create a DiagnosticType at level CheckLevel.WARNING
|
public final java.lang.String key
public final java.text.MessageFormat format
public final CheckLevel defaultLevel
public CheckLevel level
public static DiagnosticType error(java.lang.String name, java.lang.String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType warning(java.lang.String name, java.lang.String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType disabled(java.lang.String name, java.lang.String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType make(java.lang.String name, CheckLevel level, java.lang.String descriptionFormat)
name
- An identifierlevel
- Either CheckLevel.ERROR or CheckLevel.WARNINGdescriptionFormat
- A format stringpublic boolean equals(java.lang.Object type)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(DiagnosticType diagnosticType)
compareTo
in interface java.lang.Comparable<DiagnosticType>
public java.lang.String toString()
toString
in class java.lang.Object