Annotation Interface LeakedToResult
@Documented
@Retention(RUNTIME)
@Target(TYPE_USE)
@SubtypeOf(NonLeaked.class)
public @interface LeakedToResult
This annotation is used on a formal parameter to indicate that the parameter may be returned, but
it is not otherwise leaked. (A parameter is leaked if it is stored in a field where it could be
accessed later, and in that case this annotation would not apply.)
For example, the receiver parameter of StringBuffer.append(String s)
is annotated as
@LeakedToResult
, because the method returns the updated receiver.
This annotation is currently trusted, not checked.
- See Also:
- See the Checker Framework Manual:
- Aliasing Checker