public static class ContractsUtils.ConditionalPostcondition extends ContractsUtils.Contract
BaseTypeVisitor or
one of its subclasses. Automatically extracted from annotations with meta-annotation
@ConditionalPostconditionAnnotation, such as EnsuresNonNullIf.ContractsUtils.Contract.Kind| Modifier and Type | Field and Description |
|---|---|
boolean |
annoResult
The return value for the annotated method that ensures that the conditional postcondition
holds.
|
annotation, contractAnnotation, expression, kind| Constructor and Description |
|---|
ConditionalPostcondition(String expression,
boolean annoResult,
AnnotationMirror annotation,
AnnotationMirror contractAnnotation)
Create a new conditional postcondition.
|
public final boolean annoResult
@EnsuresNonNullIf(expression="foo", result=false) boolean method()foo is guaranteed to be @NonNull after a call to method() if that
call returns false.public ConditionalPostcondition(String expression, boolean annoResult, AnnotationMirror annotation, AnnotationMirror contractAnnotation)
expression - the Java expression that should have a type qualifierannoResult - whether the condition is the method returning true or falseannotation - the type qualifier that expression should havecontractAnnotation - the postcondition annotation that the programmer wrote; used
for diagnostic messagespublic boolean equals(Object o)
equals in class ContractsUtils.Contractpublic int hashCode()
hashCode in class ContractsUtils.Contract