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

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>AnnotatedSignature (infer.Nullsafe.AnnotatedSignature)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><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; AnnotatedSignature</nav><h1>Module <code>Nullsafe.AnnotatedSignature</code></h1></header><aside><p>Method signature with annotations.</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><code>{</code><table class="record"><tr id="type-t.nullsafe_mode" class="anchored"><td class="def field"><a href="#type-t.nullsafe_mode" class="anchor"></a><code>nullsafe_mode : <a href="../NullsafeMode/index.html#type-t">NullsafeMode.t</a>;</code></td></tr><tr id="type-t.kind" class="anchored"><td class="def field"><a href="#type-t.kind" class="anchor"></a><code>kind : <a href="index.html#type-kind">kind</a>;</code></td></tr><tr id="type-t.ret" class="anchored"><td class="def field"><a href="#type-t.ret" class="anchor"></a><code>ret : <a href="index.html#type-ret_signature">ret_signature</a>;</code></td></tr><tr id="type-t.params" class="anchored"><td class="def field"><a href="#type-t.params" class="anchor"></a><code>params : <span><a href="index.html#type-param_signature">param_signature</a> list</span>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-ret_signature"><a href="#type-ret_signature" class="anchor"></a><code><span class="keyword">and</span> ret_signature</code><code> = </code><code>{</code><table class="record"><tr id="type-ret_signature.ret_annotation_deprecated" class="anchored"><td class="def field"><a href="#type-ret_signature.ret_annotation_deprecated" class="anchor"></a><code>ret_annotation_deprecated : <a href="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a>;</code></td></tr><tr id="type-ret_signature.ret_annotated_type" class="anchored"><td class="def field"><a href="#type-ret_signature.ret_annotated_type" class="anchor"></a><code>ret_annotated_type : <a href="../AnnotatedType/index.html#type-t">AnnotatedType.t</a>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-param_signature"><a href="#type-param_signature" class="anchor"></a><code><span class="keyword">and</span> param_signature</code><code> = </code><code>{</code><table class="record"><tr id="type-param_signature.param_annotation_deprecated" class="anchored"><td class="def field"><a href="#type-param_signature.param_annotation_deprecated" class="anchor"></a><code>param_annotation_deprecated : <a href="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a>;</code></td></tr><tr id="type-param_signature.mangled" class="anchored"><td class="def field"><a href="#type-param_signature.mangled" class="anchor"></a><code>mangled : <a href="../../IR/Mangled/index.html#type-t">IR.Mangled.t</a>;</code></td></tr><tr id="type-param_signature.param_annotated_type" class="anchored"><td class="def field"><a href="#type-param_signature.param_annotated_type" class="anchor"></a><code>param_annotated_type : <a href="../AnnotatedType/index.html#type-t">AnnotatedType.t</a>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-kind"><a href="#type-kind" class="anchor"></a><code><span class="keyword">and</span> kind</code><code> = </code><table class="variant"><tr id="type-kind.FirstParty" class="anchored"><td class="def constructor"><a href="#type-kind.FirstParty" class="anchor"></a><code>| </code><code><span class="constructor">FirstParty</span></code></td><td class="doc"><p>Code under control. Its nullability should be expressed via annotations.</p></td></tr><tr id="type-kind.ThirdParty" class="anchored"><td class="def constructor"><a href="#type-kind.ThirdParty" class="anchor"></a><code>| </code><code><span class="constructor">ThirdParty</span> <span class="keyword">of</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a></code></td></tr></table></dt><dt class="spec type" id="type-third_party_model_source"><a href="#type-third_party_model_source" class="anchor"></a><code><span class="keyword">and</span> third_party_model_source</code><code> = </code><table class="variant"><tr id="type-third_party_model_source.Unregistered" class="anchored"><td class="def constructor"><a href="#type-third_party_model_source.Unregistered" class="anchor"></a><code>| </code><code><span class="constructor">Unregistered</span></code></td><td class="doc"><p>This is an unregistered third party method. It's nullability is best effort based on its annotations. Lack of annotation is treated depending on the mode.</p></td></tr><tr id="type-third_party_model_source.ModelledInternally" class="anchored"><td class="def constructor"><a href="#type-third_party_model_source.ModelledInternally" class="anchor"></a><code>| </code><code><span class="constructor">ModelledInternally</span></code></td></tr><tr id="type-third_party_model_source.InThirdPartyRepo" class="anchored"><td class="def constructor"><a href="#type-third_party_model_source.InThirdPartyRepo" class="anchor"></a><code>| </code><code><span class="constructor">InThirdPartyRepo</span> <span class="keyword">of</span> </code><code>{</code><table class="record"><tr id="type-third_party_model_source.filename" class="anchored"><td class="def field"><a href="#type-third_party_model_source.filename" class="anchor"></a><code>filename : string;</code></td></tr><tr id="type-third_party_model_source.line_number" class="anchored"><td class="def field"><a href="#type-third_party_model_source.line_number" class="anchor"></a><code>line_number : int;</code></td></tr></table><code>}</code></td></tr></table></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_ret_signature"><a href="#val-compare_ret_signature" class="anchor"></a><code><span class="keyword">val</span> compare_ret_signature : <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_param_signature"><a href="#val-compare_param_signature" class="anchor"></a><code><span class="keyword">val</span> compare_param_signature : <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_kind"><a href="#val-compare_kind" class="anchor"></a><code><span class="keyword">val</span> compare_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_third_party_model_source"><a href="#val-compare_third_party_model_source" class="anchor"></a><code><span class="keyword">val</span> compare_third_party_model_source : <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_ret_signature"><a href="#val-compare_ret_signature" class="anchor"></a><code><span class="keyword">val</span> compare_ret_signature : <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_param_signature"><a href="#val-compare_param_signature" class="anchor"></a><code><span class="keyword">val</span> compare_param_signature : <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_kind"><a href="#val-compare_kind" class="anchor"></a><code><span class="keyword">val</span> compare_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_third_party_model_source"><a href="#val-compare_third_party_model_source" class="anchor"></a><code><span class="keyword">val</span> compare_third_party_model_source : <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_ret_signature"><a href="#val-compare_ret_signature" class="anchor"></a><code><span class="keyword">val</span> compare_ret_signature : <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_param_signature"><a href="#val-compare_param_signature" class="anchor"></a><code><span class="keyword">val</span> compare_param_signature : <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_kind"><a href="#val-compare_kind" class="anchor"></a><code><span class="keyword">val</span> compare_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_third_party_model_source"><a href="#val-compare_third_party_model_source" class="anchor"></a><code><span class="keyword">val</span> compare_third_party_model_source : <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_ret_signature"><a href="#val-compare_ret_signature" class="anchor"></a><code><span class="keyword">val</span> compare_ret_signature : <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-ret_signature">ret_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_param_signature"><a href="#val-compare_param_signature" class="anchor"></a><code><span class="keyword">val</span> compare_param_signature : <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> <a href="index.html#type-param_signature">param_signature</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_kind"><a href="#val-compare_kind" class="anchor"></a><code><span class="keyword">val</span> compare_kind : <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> <a href="index.html#type-kind">kind</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-compare_third_party_model_source"><a href="#val-compare_third_party_model_source" class="anchor"></a><code><span class="keyword">val</span> compare_third_party_model_source : <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-get_non_virtual_params"><a href="#val-get_non_virtual_params" class="anchor"></a><code><span class="keyword">val</span> get_non_virtual_params : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-param_signature">param_signature</a> list</span></code></dt><dd><p>List of params, not counting the optional first (&quot;this&quot;) param used to represent non-static methods.</p></dd></dl><dl><dt class="spec value" id="val-set_modelled_nullability"><a href="#val-set_modelled_nullability" class="anchor"></a><code><span class="keyword">val</span> set_modelled_nullability : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-third_party_model_source">third_party_model_source</a> <span>&#45;&gt;</span> <span>(bool * <span>bool list</span>)</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Override nullability for a function signature given its modelled nullability (for ret value and params)</p></dd></dl><dl><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span>is_callee_in_trust_list:bool</span> <span>&#45;&gt;</span> <span>nullsafe_mode:<a href="../NullsafeMode/index.html#type-t">NullsafeMode.t</a></span> <span>&#45;&gt;</span> <a href="../../IR/ProcAttributes/index.html#type-t">IR.ProcAttributes.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Get a method signature with annotations from a proc_attributes.</p></dd></dl><dl><dt class="spec value" id="val-get_for_class_under_analysis"><a href="#val-get_for_class_under_analysis" class="anchor"></a><code><span class="keyword">val</span> get_for_class_under_analysis : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/ProcAttributes/index.html#type-t">IR.ProcAttributes.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Signature of the method belonging to the currently analyzed class.</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Pretty print a method signature with annotations.</p></dd></dl></div></body></html>