|
|||||||||
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
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)
Nested Class Summary | |
---|---|
static class |
Result.DiagMessage
A class that represents the diangosis messages. |
Field Summary | |
---|---|
static Result |
SUCCESS
The success result. |
Method Summary | |
---|---|
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, Object... args)
messageKey
- the key representing the reason for failureargs
- optional arguments to be included in the message
public static Result warning(String messageKey, Object... args)
messageKey
- the key for the warning messageargs
- optional arguments to be included in the message
public Result merge(Result r)
r
- the result to merge with this result
r
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 |