public final class DiagnosticType extends java.lang.Object implements java.lang.Comparable<DiagnosticType>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
CheckLevel |
defaultLevel
Default level
|
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.
|
private static long |
serialVersionUID |
| Modifier | Constructor and Description |
|---|---|
private |
DiagnosticType(java.lang.String key,
CheckLevel level,
MessageFormat format)
Create a DiagnosticType.
|
| 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
|
(package private) java.lang.String |
format(java.lang.Object... arguments)
Create a description from the MessageFormat and the arguments.
|
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
|
private static final long serialVersionUID
public final java.lang.String key
public final MessageFormat format
public final CheckLevel defaultLevel
public CheckLevel level
private DiagnosticType(java.lang.String key,
CheckLevel level,
MessageFormat format)
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 stringjava.lang.String format(java.lang.Object... arguments)
public boolean equals(java.lang.Object type)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(DiagnosticType diagnosticType)
compareTo in interface java.lang.Comparable<DiagnosticType>@GwtIncompatible(value="java.text.MessageFormat.toPattern()") public java.lang.String toString()
toString in class java.lang.Object