Annotation Interface EnsuresLockHeldIf
@Documented
@Retention(RUNTIME)
@Target({METHOD,CONSTRUCTOR})
@ConditionalPostconditionAnnotation(qualifier=LockHeld.class)
@InheritedAnnotation
@Repeatable(List.class)
public @interface EnsuresLockHeldIf
Indicates that the given expressions are held if the method terminates successfully and returns
the given result (either true or false).
- See Also:
- See the Checker Framework Manual:
- Lock Checker, Example use of @EnsuresLockHeldIf
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
A wrapper annotation that makes theEnsuresLockHeldIf
annotation repeatable. -
Required Element Summary
Modifier and TypeRequired ElementDescriptionString[]
Returns Java expressions whose values are locks that are held after the method returns the given result.boolean
Returns the return value of the method under which the postconditions hold.
-
Element Details
-
result
boolean resultReturns the return value of the method under which the postconditions hold.- Returns:
- the return value of the method under which the postconditions hold
-
expression
String[] expressionReturns Java expressions whose values are locks that are held after the method returns the given result.- Returns:
- Java expressions whose values are locks that are held after the method returns the given result
- See Also:
-