Annotation Interface UncheckedShrinkable
@Documented
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@SubtypeOf(Shrinkable.class)
public @interface UncheckedShrinkable
An expression of type
@UncheckedShrinkable
may be used to remove elements, e.g., by
calling remove()
or clear()
on it.
The Index Checker does not issue warnings about possible IndexOutOfBoundsException
s
when the collection has type UncheckedShrinkable
.
Thus, @UncheckedShrinkable
is combination of @
Shrinkable
and a warning
suppression. It is particularly useful when first annotating a codebase, to temporarily suppress
some warnings while focusing on others.
- See the Checker Framework Manual:
- Index Checker, Grow-only Checker