@SubtypeOf(value={}) @DefaultFor(value={LOCAL_VARIABLE,RESOURCE_VARIABLE}) @Documented @Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER}) public @interface UnknownInitialization
NullnessChecker
uses
freedom-before-commitment to track initialization of NonNull
fields.
This type qualifier indicates that the object might not have been fully
initialized. An object is fully initialized when each of its fields contains
a value that satisfies its type qualifier. What type qualifiers are
considered depends on the checker; for instance, the
NullnessChecker
considers NonNull
.
Therefore, reading a field of an object of type UnknownInitialization
might yield a value that does not correspond to the declared type qualifier
for that field. For instance, in the NullnessChecker
, a field
might be null
even if it has been annotated as NonNull
.
More precisely, an expression of type @UnknownInitialization(T.class)
refers to an object that has all fields of T
(and any super-classes)
initialized (e.g., to a non-null value in the NullnessChecker
).
Just @UnknownInitialization
is equivalent to
@UnknownInitialization(Object.class)
.
public abstract Class<?> value
@UnknownInitialization(T.class)
has all type-frames initialized
starting at Object
down to (and including) T
.