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>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>AnnotatedSignature (infer.Nullsafe.AnnotatedSignature)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">Nullsafe</a>» AnnotatedSignature</nav><h1>Module <code>Nullsafe.AnnotatedSignature</code></h1></header><aside><p>Method signature with annotations.</p></aside><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = </code><code>{</code><tableclass="record"><trid="type-t.nullsafe_mode"class="anchored"><tdclass="def field"><ahref="#type-t.nullsafe_mode"class="anchor"></a><code>nullsafe_mode : <ahref="../NullsafeMode/index.html#type-t">NullsafeMode.t</a>;</code></td></tr><trid="type-t.kind"class="anchored"><tdclass="def field"><ahref="#type-t.kind"class="anchor"></a><code>kind : <ahref="index.html#type-kind">kind</a>;</code></td></tr><trid="type-t.ret"class="anchored"><tdclass="def field"><ahref="#type-t.ret"class="anchor"></a><code>ret : <ahref="index.html#type-ret_signature">ret_signature</a>;</code></td></tr><trid="type-t.params"class="anchored"><tdclass="def field"><ahref="#type-t.params"class="anchor"></a><code>params : <span><ahref="index.html#type-param_signature">param_signature</a> list</span>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-ret_signature"><ahref="#type-ret_signature"class="anchor"></a><code><spanclass="keyword">and</span> ret_signature</code><code> = </code><code>{</code><tableclass="record"><trid="type-ret_signature.ret_annotation_deprecated"class="anchored"><tdclass="def field"><ahref="#type-ret_signature.ret_annotation_deprecated"class="anchor"></a><code>ret_annotation_deprecated : <ahref="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a>;</code></td></tr><trid="type-ret_signature.ret_annotated_type"class="anchored"><tdclass="def field"><ahref="#type-ret_signature.ret_annotated_type"class="anchor"></a><code>ret_annotated_type : <ahref="../AnnotatedType/index.html#type-t">AnnotatedType.t</a>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-param_signature"><ahref="#type-param_signature"class="anchor"></a><code><spanclass="keyword">and</span> param_signature</code><code> = </code><code>{</code><tableclass="record"><trid="type-param_signature.param_annotation_deprecated"class="anchored"><tdclass="def field"><ahref="#type-param_signature.param_annotation_deprecated"class="anchor"></a><code>param_annotation_deprecated : <ahref="../../IR/Annot/Item/index.html#type-t">IR.Annot.Item.t</a>;</code></td></tr><trid="type-param_signature.mangled"class="anchored"><tdclass="def field"><ahref="#type-param_signature.mangled"class="anchor"></a><code>mangled : <ahref="../../IR/Mangled/index.html#type-t">IR.Mangled.t</a>;</code></td></tr><trid="type-param_signature.param_annotated_type"class="anchored"><tdclass="def field"><ahref="#type-param_signature.param_annotated_type"class="anchor"></a><code>param_annotated_type : <ahref="../AnnotatedType/index.html#type-t">AnnotatedType.t</a>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-kind"><ahref="#type-kind"class="anchor"></a><code><spanclass="keyword">and</span> kind</code><code> = </code><tableclass="variant"><trid="type-kind.FirstParty"class="anchored"><tdclass="def constructor"><ahref="#type-kind.FirstParty"class="anchor"></a><code>| </code><code><spanclass="constructor">FirstParty</span></code></td><tdclass="doc"><p>Code under control. Its nullability should be expressed via annotations.</p></td></tr><trid="type-kind.ThirdParty"class="anchored"><tdclass="def constructor"><ahref="#type-kind.ThirdParty"class="anchor"></a><code>| </code><code><spanclass="constructor">ThirdParty</span><spanclass="keyword">of</span><ahref="index.html#type-third_party_model_source">third_party_model_source</a></code></td></tr></table></dt><dtclass="spec type"id="type-third_party_model_source"><ahref="#type-third_party_model_source"class="anchor"></a><code><spanclass="keyword">and</span> third_party_model_source</code><code> = </code><tableclass="variant"><trid="type-third_party_model_source.Unregistered"class="anchored"><tdclass="def constructor"><ahref="#type-third_party_model_source.Unregistered"class="anchor"></a><code>| </code><code><spanclass="constructor">Unregistered</span></code></td><tdclass="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><trid="type-third_party_model_source.ModelledInternally"class="anchored"><tdclass="def constructor"><ahref="#type-third_party_model_source.ModelledInternally"class="anchor"></a><code>| </code><code><spanclass="constructor">ModelledInternally</span></code></td></tr><trid="type-third_party_model_source.InThirdPartyRepo"class="anchored"><tdclass="def constructor"><ahref="#type-third_party_model_source.InThirdPartyRepo"class="anchor"></a><code>| </code><code><spanclass="constructor">InThirdPartyRepo</span><spanclass="keyword">of</span></code><code>{</code><tableclass="record"><trid="type-third_party_model_source.filename"class="anchored"><tdclass="def field"><ahref="#type-third_party_model_source.filename"class="anchor"></a><code>filename : string;</code></td></tr><trid="type-third_party_model_source.line_number"class="anchored"><tdclass="def field"><ahref="#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><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_ret_signature"><ahref="#val-compare_ret_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_ret_signature : <ahref="index.html#type-ret_signature">ret_signature</a><span>-></span><ahref="index.html#type-ret_signature">ret_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_param_signature"><ahref="#val-compare_param_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_param_signature : <ahref="index.html#type-param_signature">param_signature</a><span>-></span><ahref="index.html#type-param_signature">param_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_kind"><ahref="#val-compare_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_third_party_model_source"><ahref="#val-compare_third_party_model_source"class="anchor"></a><code><spanclass="keyword">val</span> compare_third_party_model_source : <ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span><ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_ret_signature"><ahref="#val-compare_ret_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_ret_signature : <ahref="index.html#type-ret_signature">ret_signature</a><span>-></span><ahref="index.html#type-ret_signature">ret_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_param_signature"><ahref="#val-compare_param_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_param_signature : <ahref="index.html#type-param_signature">param_signature</a><span>-></span><ahref="index.html#type-param_signature">param_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_kind"><ahref="#val-compare_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_third_party_model_source"><ahref="#val-compare_third_party_model_source"class="anchor"></a><code><spanclass="keyword">val</span> compare_third_party_model_source : <ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span><ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_ret_signature"><ahref="#val-compare_ret_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_ret_signature : <ahref="index.html#type-ret_signature">ret_signature</a><span>-></span><ahref="index.html#type-ret_signature">ret_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_param_signature"><ahref="#val-compare_param_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_param_signature : <ahref="index.html#type-param_signature">param_signature</a><span>-></span><ahref="index.html#type-param_signature">param_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_kind"><ahref="#val-compare_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_third_party_model_source"><ahref="#val-compare_third_party_model_source"class="anchor"></a><code><spanclass="keyword">val</span> compare_third_party_model_source : <ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span><ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_ret_signature"><ahref="#val-compare_ret_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_ret_signature : <ahref="index.html#type-ret_signature">ret_signature</a><span>-></span><ahref="index.html#type-ret_signature">ret_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_param_signature"><ahref="#val-compare_param_signature"class="anchor"></a><code><spanclass="keyword">val</span> compare_param_signature : <ahref="index.html#type-param_signature">param_signature</a><span>-></span><ahref="index.html#type-param_signature">param_signature</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_kind"><ahref="#val-compare_kind"class="anchor"></a><code><spanclass="keyword">val</span> compare_kind : <ahref="index.html#type-kind">kind</a><span>-></span><ahref="index.html#type-kind">kind</a><span>-></span> int</code></dt><dtclass="spec value"id="val-compare_third_party_model_source"><ahref="#val-compare_third_party_model_source"class="anchor"></a><code><spanclass="keyword">val</span> compare_third_party_model_source : <ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span><ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-get_non_virtual_params"><ahref="#val-get_non_virtual_params"class="anchor"></a><code><spanclass="keyword">val</span> get_non_virtual_params : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="index.html#type-param_signature">param_signature</a> list</span></code></dt><dd><p>List of params, not counting the optional first ("this") param used to represent non-static methods.</p></dd></dl><dl><dtclass="spec value"id="val-set_modelled_nullability"><ahref="#val-set_modelled_nullability"class="anchor"></a><code><spanclass="keyword">val</span> set_modelled_nullability : <ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-third_party_model_source">third_party_model_source</a><span>-></span><span>(bool * <span>bool list</span>)</span><span>-></span><ahref="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><dtclass="spec value"id="val-get"><ahref="#val-get"class="anchor"></a><code><spanclass="keyword">val</span> get : <span>is_callee_in_trust_list:bool</span><span>-></span><span>nullsafe_mode:<ahref="../NullsafeMode/index.html#type-t">NullsafeMode.t</a></span><span>-></span><ahref="../../IR/ProcAttributes/index.html#type-t">IR.ProcAttributes.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Get a method signature with annotations from a proc_attributes.</p></dd></dl><dl><dtclass="spec value"id="val-get_for_class_under_analysis"><ahref="#val-get_for_class_under_analysis"class="anchor"></a><code><spanclass="keyword">val</span> get_for_class_under_analysis : <ahref="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a><span>-></span><ahref="../../IR/ProcAttributes/index.html#type-t">IR.ProcAttributes.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Signature of the method belonging to the currently analyzed class.</p></dd></dl><dl><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : <ahref="../../IR/Procname/index.html#type-t">IR.Procname.t</a><span>-></span> Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Pretty print a method signature with annotations.</p></dd></dl></div></body></html>