Annotation Type Impure
-
@Documented @Retention(RUNTIME) @Target({METHOD,CONSTRUCTOR}) public @interface ImpureImpureis a method annotation that means the method might have side effects and/or might be nondeterministic. Conceptually, it completes the "lattice" of purity annotations by serving as a top element. That is, any@Puremethod can be treated as@SideEffectFreeor@Deterministic, and any@SideEffectFreeor@Deterministicmethod can be treated as@Impure.This annotation should not be written by a programmer, because leaving a method unannotated is equivalent to writing this annotation.
The purpose of this annotation is for use by tools. A tool may distinguish between unannotated methods (that the tool has not yet examined) and
@Impuremethods (that the tool has determined to be neither@SideEffectFreenor@Deterministic).- See the Checker Framework Manual:
- Side effects, determinism, purity, and
flow-sensitive analysis