|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object checkers.source.Result
@DefaultQualifier(value="checkers.nullness.quals.NonNull") public final class Result extends Object
Represents the outcome of a typechecking operation (success,
warning, or failure, plus a list of explanatory messages).
Result
s created during typechecking can be reported using
SourceChecker.report(checkers.source.Result, java.lang.Object)
, which ultimately delivers an error
or warning message via the JSR 199 compiler interface.
SourceChecker.report(checkers.source.Result, java.lang.Object)
Modifier and Type | Class and Description |
---|---|
static class |
Result.DiagMessage
A class that represents the diangosis messages. |
Modifier and Type | Field and Description |
---|---|
static Result |
SUCCESS
The success result. |
Modifier and Type | Method and Description |
---|---|
static Result |
failure(String messageKey,
Object... args)
Creates a new failure result with the given message key. |
List<Result.DiagMessage> |
getDiagMessages()
|
List<String> |
getMessageKeys()
|
boolean |
isFailure()
|
boolean |
isSuccess()
|
boolean |
isWarning()
|
Result |
merge(Result r)
Merges two results into one. |
String |
toString()
|
static Result |
warning(String messageKey,
Object... args)
Creates a new warning result with the given message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Result SUCCESS
Method Detail |
---|
public static Result failure(String messageKey, @Nullable Object... args)
messageKey
- the key representing the reason for failureargs
- optional arguments to be included in the messagepublic static Result warning(String messageKey, @Nullable Object... args)
messageKey
- the key for the warning messageargs
- optional arguments to be included in the messagepublic Result merge(Result r)
r
- the result to merge with this resultr
are success results, or a result that has the
more significant type (failure > warning > success) and
the message keys of both this result and r
public boolean isSuccess()
public boolean isFailure()
public boolean isWarning()
public List<String> getMessageKeys()
public List<Result.DiagMessage> getDiagMessages()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |