<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>ThirdPartyAnnotationInfo (infer.Nullsafe.ThirdPartyAnnotationInfo)</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> » <a href="../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><dt class="spec type" id="type-signature_info"><a href="#type-signature_info" class="anchor"></a><code><span class="keyword">type</span> signature_info</code><code> = </code><code>{</code><table class="record"><tr id="type-signature_info.filename" class="anchored"><td class="def field"><a href="#type-signature_info.filename" class="anchor"></a><code>filename : string;</code></td><td class="doc"><p>File where the particular signature is stored</p></td></tr><tr id="type-signature_info.line_number" class="anchored"><td class="def field"><a href="#type-signature_info.line_number" class="anchor"></a><code>line_number : int;</code></td><td class="doc"><p>Line number with this signature</p></td></tr><tr id="type-signature_info.signature" class="anchored"><td class="def field"><a href="#type-signature_info.signature" class="anchor"></a><code>signature : <a href="../ThirdPartyMethod/index.html#type-t">ThirdPartyMethod.t</a>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-unique_repr"><a href="#type-unique_repr" class="anchor"></a><code><span class="keyword">type</span> unique_repr</code><code> = </code><code>{</code><table class="record"><tr id="type-unique_repr.class_name" class="anchored"><td class="def field"><a href="#type-unique_repr.class_name" class="anchor"></a><code>class_name : <a href="../ThirdPartyMethod/index.html#type-fully_qualified_type">ThirdPartyMethod.fully_qualified_type</a>;</code></td></tr><tr id="type-unique_repr.method_name" class="anchored"><td class="def field"><a href="#type-unique_repr.method_name" class="anchor"></a><code>method_name : <a href="../ThirdPartyMethod/index.html#type-method_name">ThirdPartyMethod.method_name</a>;</code></td></tr><tr id="type-unique_repr.param_types" class="anchored"><td class="def field"><a href="#type-unique_repr.param_types" class="anchor"></a><code>param_types : <span><a href="../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><dt class="spec value" id="val-pp_unique_repr"><a href="#val-pp_unique_repr" class="anchor"></a><code><span class="keyword">val</span> pp_unique_repr : Stdlib.Format.formatter <span>-></span> <a href="index.html#type-unique_repr">unique_repr</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-unique_repr_of_java_proc_name"><a href="#val-unique_repr_of_java_proc_name" class="anchor"></a><code><span class="keyword">val</span> unique_repr_of_java_proc_name : <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>-></span> <a href="index.html#type-unique_repr">unique_repr</a></code></dt></dl><dl><dt class="spec type" id="type-storage"><a href="#type-storage" class="anchor"></a><code><span class="keyword">type</span> storage</code></dt></dl><dl><dt class="spec value" id="val-create_storage"><a href="#val-create_storage" class="anchor"></a><code><span class="keyword">val</span> create_storage : unit <span>-></span> <a href="index.html#type-storage">storage</a></code></dt></dl><dl><dt class="spec type" id="type-file_parsing_error"><a href="#type-file_parsing_error" class="anchor"></a><code><span class="keyword">type</span> file_parsing_error</code><code> = </code><code>{</code><table class="record"><tr id="type-file_parsing_error.line_number" class="anchored"><td class="def field"><a href="#type-file_parsing_error.line_number" class="anchor"></a><code>line_number : int;</code></td></tr><tr id="type-file_parsing_error.unparsable_method" class="anchored"><td class="def field"><a href="#type-file_parsing_error.unparsable_method" class="anchor"></a><code>unparsable_method : string;</code></td></tr><tr id="type-file_parsing_error.parsing_error" class="anchored"><td class="def field"><a href="#type-file_parsing_error.parsing_error" class="anchor"></a><code>parsing_error : <a href="../ThirdPartyMethod/index.html#type-parsing_error">ThirdPartyMethod.parsing_error</a>;</code></td></tr></table><code>}</code></dt></dl><dl><dt class="spec value" id="val-pp_parsing_error"><a href="#val-pp_parsing_error" class="anchor"></a><code><span class="keyword">val</span> pp_parsing_error : Stdlib.Format.formatter <span>-></span> <a href="index.html#type-file_parsing_error">file_parsing_error</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-add_from_signature_file"><a href="#val-add_from_signature_file" class="anchor"></a><code><span class="keyword">val</span> add_from_signature_file : <a href="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>(<a href="index.html#type-storage">storage</a>, <a href="index.html#type-file_parsing_error">file_parsing_error</a>)</span> <a href="../../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><dt class="spec value" id="val-find_nullability_info"><a href="#val-find_nullability_info" class="anchor"></a><code><span class="keyword">val</span> find_nullability_info : <a href="index.html#type-storage">storage</a> <span>-></span> <a href="index.html#type-unique_repr">unique_repr</a> <span>-></span> <span><a href="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><dt class="spec value" id="val-lookup_related_sig_file"><a href="#val-lookup_related_sig_file" class="anchor"></a><code><span class="keyword">val</span> lookup_related_sig_file : <a href="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><dt class="spec value" id="val-lookup_related_sig_file_for_proc"><a href="#val-lookup_related_sig_file_for_proc" class="anchor"></a><code><span class="keyword">val</span> lookup_related_sig_file_for_proc : <a href="index.html#type-storage">storage</a> <span>-></span> <a href="../../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><dt class="spec value" id="val-is_third_party_proc"><a href="#val-is_third_party_proc" class="anchor"></a><code><span class="keyword">val</span> is_third_party_proc : <a href="index.html#type-storage">storage</a> <span>-></span> <a href="../../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><dt class="spec value" id="val-is_third_party_typ"><a href="#val-is_third_party_typ" class="anchor"></a><code><span class="keyword">val</span> is_third_party_typ : <a href="index.html#type-storage">storage</a> <span>-></span> <a href="../../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><dt class="spec value" id="val-is_third_party_class_name"><a href="#val-is_third_party_class_name" class="anchor"></a><code><span class="keyword">val</span> is_third_party_class_name : <a href="index.html#type-storage">storage</a> <span>-></span> <a href="../../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>