DiagMessage
or List<DiagMessage>
instead@Deprecated public final class Result extends Object
Result
s created during type-checking can be reported using SourceChecker.report(org.checkerframework.framework.source.Result, java.lang.Object)
, which ultimately delivers an error or warning message via the JSR 199
compiler interface.Modifier and Type | Field and Description |
---|---|
static Result |
SUCCESS
Deprecated.
The success result.
|
Modifier and Type | Method and Description |
---|---|
static Result |
failure(@CompilerMessageKey String messageKey,
Object... args)
Deprecated.
use a
DiagMessage instead, or call reportError or reportWarning directly |
List<DiagMessage> |
getDiagMessages()
Deprecated.
|
List<String> |
getMessageKeys()
Deprecated.
|
boolean |
isFailure()
Deprecated.
|
boolean |
isSuccess()
Deprecated.
|
boolean |
isWarning()
Deprecated.
|
Result |
merge(Result r)
Deprecated.
Merges two results into one.
|
String |
toString()
Deprecated.
|
static Result |
warning(@CompilerMessageKey String messageKey,
Object... args)
Deprecated.
use a
DiagMessage instead |
public static final Result SUCCESS
@Deprecated public static Result failure(@CompilerMessageKey String messageKey, Object... args)
DiagMessage
instead, or call reportError
or reportWarning
directlymessageKey
- the key representing the reason for failureargs
- optional arguments to be included in the message@Deprecated public static Result warning(@CompilerMessageKey String messageKey, Object... args)
DiagMessage
insteadmessageKey
- the key for the warning messageargs
- optional arguments to be included in the messagepublic Result merge(Result r)
If both this and r
are success results, returns the success result.
Otherwise, returns a result with the more severe type (failure > warning > success) and the union of the messages.
r
- the result to merge with this resultpublic boolean isSuccess()
public boolean isFailure()
public boolean isWarning()
public List<String> getMessageKeys()
public List<DiagMessage> getDiagMessages()
@SideEffectFree public String toString()