public final class DiagnosticType extends Object implements Comparable<DiagnosticType>, Serializable
Modifier and Type | Field and Description |
---|---|
CheckLevel |
defaultLevel
Default level
|
MessageFormat |
format
The default way to format errors
|
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(String name,
String descriptionFormat)
Create a DiagnosticType at level CheckLevel.OFF
|
boolean |
equals(Object type) |
static DiagnosticType |
error(String name,
String descriptionFormat)
Create a DiagnosticType at level CheckLevel.ERROR
|
int |
hashCode() |
static DiagnosticType |
make(String name,
CheckLevel level,
String descriptionFormat)
Create a DiagnosticType at a given CheckLevel.
|
String |
toString() |
static DiagnosticType |
warning(String name,
String descriptionFormat)
Create a DiagnosticType at level CheckLevel.WARNING
|
public final String key
public final MessageFormat format
public final CheckLevel defaultLevel
public CheckLevel level
public static DiagnosticType error(String name, String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType warning(String name, String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType disabled(String name, String descriptionFormat)
name
- An identifierdescriptionFormat
- A format stringpublic static DiagnosticType make(String name, CheckLevel level, String descriptionFormat)
name
- An identifierlevel
- Either CheckLevel.ERROR or CheckLevel.WARNINGdescriptionFormat
- A format stringpublic int compareTo(DiagnosticType diagnosticType)
compareTo
in interface Comparable<DiagnosticType>
Copyright © 2009–2023 Google. All rights reserved.