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
3.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Initializers (infer.Nullsafe.Initializers)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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; Initializers</nav><h1>Module <code>Nullsafe.Initializers</code></h1></header><aside><p>Functionality for evaluating typestates after class initialization. Nullsafe's notion of initialization augments Java's one in the following way:</p><ol><li>A method is considered &quot;initializer&quot; if it is either marked as <code>@Initializer</code> or is in the list of known initializer methods (e.g. onCreate()).</li><li>For each constructor, Nullsafe assumes all initializer methods will be called after the constructor is called. (Nullsafe does not check if this assumption is indeed true).</li><li>Nullsafe uses assumption 2, in order to check if class fields were initialized or not. (a non-nullable field is considered not initialized if it is not initialized in at least one constructor).</li></ol></aside><dl><dt class="spec value" id="val-final_initializer_typestates_lazy"><a href="#val-final_initializer_typestates_lazy" class="anchor"></a><code><span class="keyword">val</span> final_initializer_typestates_lazy : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procdesc/index.html#type-t">IR.Procdesc.t</a> <span>&#45;&gt;</span> <span>(bool <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procdesc/index.html#type-t">IR.Procdesc.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> * <span><span class="type-var">'c</span> option</span>)</span> <span>&#45;&gt;</span> <span><span><span>(<a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> * <span class="type-var">'c</span>)</span> list</span> lazy_t</span></code></dt><dd><p>Typestates after the current constructor and all initializer procedures.</p></dd></dl><dl><dt class="spec value" id="val-final_constructor_typestates_lazy"><a href="#val-final_constructor_typestates_lazy" class="anchor"></a><code><span class="keyword">val</span> final_constructor_typestates_lazy : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <span>(bool <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procdesc/index.html#type-t">IR.Procdesc.t</a> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span> <span>&#45;&gt;</span> <span class="type-var">'b</span> * <span><span class="type-var">'c</span> option</span>)</span> <span>&#45;&gt;</span> <span><span><span>(<a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> * <span class="type-var">'c</span>)</span> list</span> lazy_t</span></code></dt><dd><p>Typestates after all constructors.</p></dd></dl></div></body></html>