Class Contract.ConditionalPostcondition
java.lang.Object
org.checkerframework.framework.util.Contract
org.checkerframework.framework.util.Contract.ConditionalPostcondition
- Enclosing class:
- Contract
Represents a conditional postcondition that must be verified by 
BaseTypeVisitor or one
 of its subclasses. Automatically extracted from annotations with meta-annotation
 @ConditionalPostconditionAnnotation, such as EnsuresNonNullIf.- 
Nested Class SummaryNested classes/interfaces inherited from class org.checkerframework.framework.util.ContractContract.ConditionalPostcondition, Contract.Kind, Contract.Postcondition, Contract.Precondition
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal booleanThe return value for the annotated method that ensures that the conditional postcondition holds.Fields inherited from class org.checkerframework.framework.util.Contractannotation, contractAnnotation, expressionString, kind
- 
Constructor SummaryConstructorsConstructorDescriptionConditionalPostcondition(String expressionString, AnnotationMirror annotation, AnnotationMirror contractAnnotation, boolean resultValue) Create a new conditional postcondition.
- 
Method SummaryMethods inherited from class org.checkerframework.framework.util.Contractcreate, viewpointAdaptDependentTypeAnnotation
- 
Field Details- 
resultValuepublic final boolean resultValueThe return value for the annotated method that ensures that the conditional postcondition holds. For example, given@EnsuresNonNullIf(expression="foo", result=false) boolean method()foois guaranteed to be@NonNullafter a call tomethod()that returnsfalse.
 
- 
- 
Constructor Details- 
ConditionalPostconditionpublic ConditionalPostcondition(String expressionString, AnnotationMirror annotation, AnnotationMirror contractAnnotation, boolean resultValue) Create a new conditional postcondition.- Parameters:
- expressionString- the Java expression that should have a type qualifier
- annotation- the type qualifier that- expressionStringshould have
- contractAnnotation- the postcondition annotation that the programmer wrote; used for diagnostic messages
- resultValue- whether the condition is the method returning true or false
 
 
- 
- 
Method Details