@SubtypeOf(value={})
@DefaultFor(value={LOCAL_VARIABLE,RESOURCE_VARIABLE,IMPLICIT_UPPER_BOUND})
@Documented
@Retention(value=RUNTIME)
@Target(value={TYPE_USE,TYPE_PARAMETER})
public @interface ReadOnly
Indicates that the annotated reference is a ReadOnly reference.
A ReadOnly
reference could refer to a Mutable or an Immutable
object. An object may not be mutated through a read only reference,
except if the field is marked Assignable
. Only a method with a
readonly receiver can be called using a readonly reference.
- See the Checker Framework Manual:
- IGJ Checker