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(java.lang.String expression,
boolean annoResult,
javax.lang.model.element.AnnotationMirror annotation,
javax.lang.model.element.AnnotationMirror contractAnnotation)
Create a new conditional postcondition.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
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(java.lang.String expression,
boolean annoResult,
javax.lang.model.element.AnnotationMirror annotation,
javax.lang.model.element.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(java.lang.Object o)
equals in class ContractsUtils.Contractpublic int hashCode()
hashCode in class ContractsUtils.Contract