You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
15 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>AnnotatedNullability (infer.Nullsafe.AnnotatedNullability)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Nullsafe</a> &#x00BB; AnnotatedNullability</nav><h1>Module <code>Nullsafe.AnnotatedNullability</code></h1></header><aside><p>Nullability of a type in Java program (e.g. in a function or field declaration). It might come from explicit annotations (or lack of annotation), or from other sources, including conventions about defaults, models, or the mode nullsafe runs in. NOTE: This is complementary to <a href="../InferredNullability/index.html#type-t"><code>InferredNullability.t</code></a>. <a href="../InferredNullability/index.html"><code>InferredNullability</code></a> contains info about _actual_ nullability (what did nullsafe infer according to its flow-sensitive rules.). In contrast, AnnotatedNullability represents _formal_ type as it appears in the program code. NOTE: Nullsafe disregards user-provided annotations for local types, so annotated nullability applies only for types declared at methods and field level.</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><table class="variant"><tr id="type-t.Nullable" class="anchored"><td class="def constructor"><a href="#type-t.Nullable" class="anchor"></a><code>| </code><code><span class="constructor">Nullable</span> <span class="keyword">of</span> <a href="index.html#type-nullable_origin">nullable_origin</a></code></td></tr><tr id="type-t.ThirdPartyNonnull" class="anchored"><td class="def constructor"><a href="#type-t.ThirdPartyNonnull" class="anchor"></a><code>| </code><code><span class="constructor">ThirdPartyNonnull</span></code></td></tr><tr id="type-t.UncheckedNonnull" class="anchored"><td class="def constructor"><a href="#type-t.UncheckedNonnull" class="anchor"></a><code>| </code><code><span class="constructor">UncheckedNonnull</span> <span class="keyword">of</span> <a href="index.html#type-unchecked_nonnull_origin">unchecked_nonnull_origin</a></code></td></tr><tr id="type-t.LocallyTrustedNonnull" class="anchored"><td class="def constructor"><a href="#type-t.LocallyTrustedNonnull" class="anchor"></a><code>| </code><code><span class="constructor">LocallyTrustedNonnull</span></code></td></tr><tr id="type-t.LocallyCheckedNonnull" class="anchored"><td class="def constructor"><a href="#type-t.LocallyCheckedNonnull" class="anchor"></a><code>| </code><code><span class="constructor">LocallyCheckedNonnull</span></code></td></tr><tr id="type-t.StrictNonnull" class="anchored"><td class="def constructor"><a href="#type-t.StrictNonnull" class="anchor"></a><code>| </code><code><span class="constructor">StrictNonnull</span> <span class="keyword">of</span> <a href="index.html#type-strict_nonnull_origin">strict_nonnull_origin</a></code></td></tr></table></dt><dd><p>See <a href="../Nullability/index.html#type-t"><code>Nullability.t</code></a> for explanation</p></dd></dl><dl><dt class="spec type" id="type-nullable_origin"><a href="#type-nullable_origin" class="anchor"></a><code><span class="keyword">and</span> nullable_origin</code><code> = </code><table class="variant"><tr id="type-nullable_origin.AnnotatedNullable" class="anchored"><td class="def constructor"><a href="#type-nullable_origin.AnnotatedNullable" class="anchor"></a><code>| </code><code><span class="constructor">AnnotatedNullable</span></code></td><td class="doc"><p>The type is expicitly annotated with <code>@Nullable</code> in the code</p></td></tr><tr id="type-nullable_origin.AnnotatedPropagatesNullable" class="anchored"><td class="def constructor"><a href="#type-nullable_orig