public class Description extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Description.Builder
Builder for
Description s. |
Modifier and Type | Field and Description |
---|---|
String |
checkName
The name of the check that produced the match.
|
List<Fix> |
fixes
A list of fixes to suggest in an error message or use in automated refactoring.
|
static Description |
NO_MATCH
Describes the sentinel value of the case where the match failed.
|
com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition |
position
The position of the match.
|
BugPattern.SeverityLevel |
severity
Is this a warning, error, etc.?
|
Modifier and Type | Method and Description |
---|---|
Description |
applySeverityOverride(BugPattern.SeverityLevel severity)
Internal-only.
|
static Description.Builder |
builder(com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition position,
String name,
String link,
BugPattern.SeverityLevel severity,
String message)
Returns a new builder for
Description s. |
static Description.Builder |
builder(com.sun.tools.javac.tree.JCTree tree,
String name,
String link,
BugPattern.SeverityLevel severity,
String message)
Returns a new builder for
Description s. |
static Description.Builder |
builder(com.sun.source.tree.Tree node,
String name,
String link,
BugPattern.SeverityLevel severity,
String message)
Returns a new builder for
Description s. |
String |
getLink()
Returns a link associated with this finding or null if there is no link.
|
String |
getMessage()
Returns the message to be printed by the compiler when a match is found in interactive use.
|
String |
getMessageWithoutCheckName()
Returns the message, not including the check name but including the link.
|
String |
getRawMessage()
Returns the raw message, not including a link or check name.
|
public static final Description NO_MATCH
public final com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition position
public final String checkName
public final List<Fix> fixes
public final BugPattern.SeverityLevel severity
public String getMessage()
@Nullable public String getLink()
public String getRawMessage()
public String getMessageWithoutCheckName()
@CheckReturnValue public Description applySeverityOverride(BugPattern.SeverityLevel severity)
public static Description.Builder builder(com.sun.source.tree.Tree node, String name, @Nullable String link, BugPattern.SeverityLevel severity, String message)
Description
s.public static Description.Builder builder(com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition position, String name, @Nullable String link, BugPattern.SeverityLevel severity, String message)
Description
s.public static Description.Builder builder(com.sun.tools.javac.tree.JCTree tree, String name, @Nullable String link, BugPattern.SeverityLevel severity, String message)
Description
s.Copyright © 2021 Google LLC. All rights reserved.