@Documented
@Retention(value=RUNTIME)
@Target(value={ANNOTATION_TYPE,FIELD})
public @interface IgnoreInWholeProgramInference
1. As a meta-annotation indicating that an annotation type prevents whole-program inference.
For example, if the definition of @Inject
is meta-annotated with
@IgnoreInWholeProgramInference
:
@IgnoreInWholeProgramInference
@interface Inject { }
then no type qualifier will be inferred for any field annotated by @Inject
.
This is appropriate for fields that are set reflectively, so there are no calls in client code
that type inference can learn from. Examples of qualifiers that should be meta-annotated with
@IgnoreInWholeProgramInference
include @Inject
, @Singleton
,
and @Option
.
2. As a field annotation indicating that no type qualifier will be inferred for the field it annotates.
WholeProgramInferenceScenes.updateInferredFieldType(org.checkerframework.dataflow.cfg.node.FieldAccessNode, org.checkerframework.dataflow.cfg.node.Node, com.sun.source.tree.ClassTree, org.checkerframework.framework.type.AnnotatedTypeFactory)