Top Description Methods
org.checkerframework.checker.lock.qual

public @Interface ReleasesNoLocks

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:METHOD, CONSTRUCTOR
@InheritedAnnotation
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.checkerframework.dataflow.qual.Pure, .SideEffectFree, org.checkerframework.framework.qual.InheritedAnnotation

The method maintains a strictly nondecreasing lock held count on the current thread for any locks that were held prior to the method call. The same property must in general be true of all the methods it calls, which should themselves be annotated as @ReleasesNoLocks or a stronger annotation such as @SideEffectFree.

The method might acquire locks but then release them, or might acquire locks but not release them (in which case it should also be annotated with @EnsuresLockHeld or @EnsuresLockHeldIf).

This is the default for methods being type-checked that have no @LockingFree, @MayReleaseLocks, @SideEffectFree, or @Pure annotation.

@ReleasesNoLocks provides a guarantee unlike @MayReleaseLocks, which provides no guarantees. However, @ReleasesNoLocks provides a weaker guarantee than @LockingFree.

See Also
MayReleaseLocks, LockingFree, SideEffectFree, Pure

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString