Class TestDiagnostic
java.lang.Object
org.checkerframework.framework.test.diagnostics.TestDiagnostic
Represents an expected error/warning message in a Java test file or an error/warning reported by
the Javac compiler. By contrast,
TestDiagnosticLine
represents a set of TestDiagnostics,
all of which were read from the same line of a file.- See Also:
-
Constructor Summary
ConstructorDescriptionTestDiagnostic
(String filename, long lineNumber, DiagnosticKind kind, String message, boolean isFixable, boolean omitParentheses) Basic constructor that sets the immutable fields of this diagnostic. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Equality is compared without isFixable/omitParentheses.getKind()
long
int
hashCode()
boolean
repr()
Returns the internal representation of this, formatted.boolean
Returns whether or not the printed representation should omit parentheses around the message.toString()
Returns a representation of this diagnostic as if it appeared in a diagnostics file.
-
Constructor Details
-
TestDiagnostic
public TestDiagnostic(String filename, long lineNumber, DiagnosticKind kind, String message, boolean isFixable, boolean omitParentheses) Basic constructor that sets the immutable fields of this diagnostic.
-
-
Method Details
-
getFilename
-
getLineNumber
public long getLineNumber() -
getKind
-
getMessage
-
isFixable
public boolean isFixable() -
shouldOmitParentheses
public boolean shouldOmitParentheses()Returns whether or not the printed representation should omit parentheses around the message.- Returns:
- whether or not the printed representation should omit parentheses around the message
-
equals
Equality is compared without isFixable/omitParentheses. -
hashCode
public int hashCode() -
toString
Returns a representation of this diagnostic as if it appeared in a diagnostics file. -
repr
Returns the internal representation of this, formatted.- Returns:
- the internal representation of this, formatted
-