This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ThirdPartyAnnotationInfo (infer.Nullsafe.ThirdPartyAnnotationInfo)</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>» ThirdPartyAnnotationInfo</nav><h1>Module <code>Nullsafe.ThirdPartyAnnotationInfo</code></h1></header><aside><p>In-memory storage the information about nullability annotation of third-party methods.</p></aside><dl><dtclass="spec type"id="type-signature_info"><ahref="#type-signature_info"class="anchor"></a><code><spanclass="keyword">type</span> signature_info</code><code> = </code><code>{</code><tableclass="record"><trid="type-signature_info.filename"class="anchored"><tdclass="def field"><ahref="#type-signature_info.filename"class="anchor"></a><code>filename : string;</code></td><tdclass="doc"><p>File where the particular signature is stored</p></td></tr><trid="type-signature_info.line_number"class="anchored"><tdclass="def field"><ahref="#type-signature_info.line_number"class="anchor"></a><code>line_number : int;</code></td><tdclass="doc"><p>Line number with this signature</p></td></tr><trid="type-signature_info.signature"class="anchored"><tdclass="def field"><ahref="#type-signature_info.signature"class="anchor"></a><code>signature : <ahref="../ThirdPartyMethod/index.html#type-t">ThirdPartyMethod.t</a>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-unique_repr"><ahref="#type-unique_repr"class="anchor"></a><code><spanclass="keyword">type</span> unique_repr</code><code> = </code><code>{</code><tableclass="record"><trid="type-unique_repr.class_name"class="anchored"><tdclass="def field"><ahref="#type-unique_repr.class_name"class="anchor"></a><code>class_name : <ahref="../ThirdPartyMethod/index.html#type-fully_qualified_type">ThirdPartyMethod.fully_qualified_type</a>;</code></td></tr><trid="type-unique_repr.method_name"class="anchored"><tdclass="def field"><ahref="#type-unique_repr.method_name"class="anchor"></a><code>method_name : <ahref="../ThirdPartyMethod/index.html#type-method_name">ThirdPartyMethod.method_name</a>;</code></td></tr><trid="type-unique_repr.param_types"class="anchored"><tdclass="def field"><ahref="#type-unique_repr.param_types"class="anchor"></a><code>param_types : <span><ahref="../ThirdPartyMethod/index.html#type-fully_qualified_type">ThirdPartyMethod.fully_qualified_type</a> list</span>;</code></td></tr></table><code>}</code></dt><dd><p>The minimum information that is needed to _uniquely_ identify the method. That why we don't</p><ul><li>include e.g. return type, access quilifiers, or whether the method is static (because Java</li><li>overload resolution rules ignore these things). In contrast, parameter types are essential,</li><li>because Java allows several methods with different types.</li></ul></dd></dl><dl><dtclass="spec value"id="val-pp_unique_repr"><ahref="#val-pp_unique_repr"class="anchor"></a><code><spanclass="keyword">val</span> pp_unique_repr : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-unique_repr">unique_repr</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-unique_repr_of_java_proc_name"><ahref="#val-unique_repr_of_java_proc_name"class="anchor"></a><code><spanclass="keyword">val</span> unique_repr_of_java_proc_name : <ahref="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a><span>-></span><ahref="index.html#type-unique_repr">unique_repr</a></code></dt></dl><dl><dtclass="spec type"id="type-storage"><ahref="#type-storage"class="anchor"></a><code><spanclass="keyword">type</span> storage</code></dt></dl><dl><dtclass="spec value"id="val-create_storage"><ahref="#val-create_storage"class="anchor"></a><code><spanclass="keyword">val</span> create_storage : unit <span>-></span><ahref="index.html#type-storage">storage</a></code></dt></dl><dl><dtclass="spec type"id="type-file_parsing_error"><ahref="#type-file_parsing_error"class="anchor"></a><code><spanclass="keyword">type</span> file_parsing_error</code><code> = </code><code>{</code><tableclass="record"><trid="type-file_parsing_error.line_number"class="anchored"><tdclass="def field"><ahref="#type-file_parsing_error.line_number"class="anchor"></a><code>line_number : int;</code></td></tr><trid="type-file_parsing_error.unparsable_method"class="anchored"><tdclass="def field"><ahref="#type-file_parsing_error.unparsable_method"class="anchor"></a><code>unparsable_method : string;</code></td></tr><trid="type-file_parsing_error.parsing_error"class="anchored"><tdclass="def field"><ahref="#type-file_parsing_error.parsing_error"class="anchor"></a><code>parsing_error : <ahref="../ThirdPartyMethod/index.html#type-parsing_error">ThirdPartyMethod.parsing_error</a>;</code></td></tr></table><code>}</code></dt></dl><dl><dtclass="spec value"id="val-pp_parsing_error"><ahref="#val-pp_parsing_error"class="anchor"></a><code><spanclass="keyword">val</span> pp_parsing_error : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-file_parsing_error">file_parsing_error</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-add_from_signature_file"><ahref="#val-add_from_signature_file"class="anchor"></a><code><spanclass="keyword">val</span> add_from_signature_file : <ahref="index.html#type-storage">storage</a><span>-></span><span>filename:string</span><span>-></span><span>lines:<span>string list</span></span><span>-></span><span><span>(<ahref="index.html#type-storage">storage</a>,<ahref="index.html#type-file_parsing_error">file_parsing_error</a>)</span><ahref="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dd><p>Parse the information from the signature file, and add it to the storage</p></dd></dl><dl><dtclass="spec value"id="val-find_nullability_info"><ahref="#val-find_nullability_info"class="anchor"></a><code><spanclass="keyword">val</span> find_nullability_info : <ahref="index.html#type-storage">storage</a><span>-></span><ahref="index.html#type-unique_repr">unique_repr</a><span>-></span><span><ahref="index.html#type-signature_info">signature_info</a> option</span></code></dt><dd><p>The main method. Do we have an information about the third-party method? If we do not, or it is not a third-party method, returns None. Otherwise returns the nullability information.</p></dd></dl><dl><dtclass="spec value"id="val-lookup_related_sig_file"><ahref="#val-lookup_related_sig_file"class="anchor"></a><code><spanclass="keyword">val</span> lookup_related_sig_file : <ahref="index.html#type-storage">storage</a><span>-></span><span>package:string</span><span>-></span><span>string option</span></code></dt><dd><p>If the package is third-party, return the relevant .sig file to add signatures for this package.</p></dd></dl><dl><dtclass="spec value"id="val-lookup_related_sig_file_for_proc"><ahref="#val-lookup_related_sig_file_for_proc"class="anchor"></a><code><spanclass="keyword">val</span> lookup_related_sig_file_for_proc : <ahref="index.html#type-storage">storage</a><span>-></span><ahref="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a><span>-></span><span>string option</span></code></dt><dd><p>If the function is third-party (based on its package), return relevant .sig file</p></dd></dl><dl><dtclass="spec value"id="val-is_third_party_proc"><ahref="#val-is_third_party_proc"class="anchor"></a><code><spanclass="keyword">val</span> is_third_party_proc : <ahref="index.html#type-storage">storage</a><span>-></span><ahref="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a><span>-></span> bool</code></dt><dd><p>Checks whether a required procname comes from third-party code based on available .sig files and config flags. NOTE: considering config flags is done for compatibility with the legacy behaviour and will be removed in the future</p></dd></dl><dl><dtclass="spec value"id="val-is_third_party_typ"><ahref="#val-is_third_party_typ"class="anchor"></a><code><spanclass="keyword">val</span> is_third_party_typ : <ahref="index.html#type-storage">storage</a><span>-></span><ahref="../../IR/Typ/index.html#type-t">IR.Typ.t</a><span>-></span> bool</code></dt><dd><p>See <code>is_third_party_proc</code>.</p></dd></dl><dl><dtclass="spec value"id="val-is_third_party_class_name"><ahref="#val-is_third_party_class_name"class="anchor"></a><code><spanclass="keyword">val</span> is_third_party_class_name : <ahref="index.html#type-storage">storage</a><span>-></span><ahref="../../IR/JavaClassName/index.html#type-t">IR.JavaClassName.t</a><span>-></span> bool</code></dt><dd><p>See <code>is_third_party_proc</code>.</p></dd></dl></div></body></html>