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>Nullsafe__ThirdPartyMethod (infer.Nullsafe__ThirdPartyMethod)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.0"/><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>» Nullsafe__ThirdPartyMethod</nav><h1>Module <code>Nullsafe__ThirdPartyMethod</code></h1><p>A helper module responsible for representing nullability information for a single 3rd party method, as well with functionality to read this information from the 3rd party nullability repository.</p></header><dl><dtclass="spec type"id="type-fully_qualified_type"><ahref="#type-fully_qualified_type"class="anchor"></a><code><spanclass="keyword">type</span> fully_qualified_type</code><code> = string</code></dt><dd><p>E.g. "full.package.name.TypeName$NestedTypeName1$NestedTypeName2"</p></dd></dl><dl><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="index.html#type-fully_qualified_type">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="index.html#type-method_name">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="index.html#type-fully_qualified_type">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 include e.g. return type, access quilifiers, or whether the method is static (because Java overload resolution rules ignore these things). In contrast, parameter types are essential, because Java allows several methods with different types.</p></dd></dl><dl><dtclass="spec type"id="type-method_name"><ahref="#type-method_name"class="anchor"></a><code><spanclass="keyword">and</span> method_name</code><code> = </code><tableclass="variant"><trid="type-method_name.Constructor"class="anchored"><tdclass="def constructor"><ahref="#type-method_name.Constructor"class="anchor"></a><code>| </code><code><spanclass="constructor">Constructor</span></code></td></tr><trid="type-method_name.Method"class="anchored"><tdclass="def constructor"><ahref="#type-method_name.Method"class="anchor"></a><code>| </code><code><spanclass="constructor">Method</span><spanclass="keyword">of</span> string</code></td></tr></table></dt></dl><dl><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><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></dl><dl><dtclass="spec type"id="type-nullability"><ahref="#type-nullability"class="anchor"></a><code><spanclass="keyword">type</span> nullability</code><code> = </code><code>{</code><tableclass="record"><trid="type-nullability.ret_nullability"class="anchored"><tdclass="def field"><ahref="#type-nullability.ret_nullability"class="anchor"></a><code>ret_nullability : <ahref="index.html#type-type_nullability">type_nullability</a>;</code></td></tr><trid="type-nullability.param_nullability"class="anchored"><tdclass="def field"><ahref="#type-nullability.param_nullability"class="anchor"></a><code>param_nullability : <span><ahref="index.html#type-type_nullability">type_nullability</a> list</span>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-type_nullability"><ahref="#type-type_nullability"class="anchor"></a><code><spanclass="keyword">and</span> type_nullability</code><code> = </code><tableclass="variant"><trid="type-type_nullability.Nullable"class="anchored"><tdclass="def constructor"><ahref="#type-type_nullability.Nullable"class="anchor"></a><code>| </code><code><spanclass="constructor">Nullable</span></code></td></tr><trid="type-type_nullability.Nonnull"class="anchored"><tdclass="def constructor"><ahref="#type-type_nullability.Nonnull"class="anchor"></a><code>| </code><code><spanclass="constructor">Nonnull</span></code></td></tr></table></dt></dl><dl><dtclass="spec value"id="val-pp_nullability"><ahref="#val-pp_nullability"class="anchor"></a><code><spanclass="keyword">val</span> pp_nullability : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-nullability">nullability</a><span>-></span> unit</code></dt></dl><dl><dtclass="spec type"id="type-parsing_error"><ahref="#type-parsing_error"class="anchor"></a><code><spanclass="keyword">type</span> parsing_error</code></dt></dl><dl><dtclass="spec value"id="val-string_of_parsing_error"><ahref="#val-string_of_parsing_error"class="anchor"></a><code><spanclass="keyword">val</span> string_of_parsing_error : <ahref="index.html#type-parsing_error">parsing_error</a><span>-></span> string</code></dt><dtclass="spec value"id="val-parse"><ahref="#val-parse"class="anchor"></a><code><spanclass="keyword">val</span> parse : string <span>-></span><span><span>(<ahref="index.html#type-unique_repr">unique_repr</a> * <ahref="index.html#type-nullability">nullability</a>,<ahref="index.html#type-parsing_error">parsing_error</a>)</span><ahref="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dd><p>Given a string representing nullability information for a given third-party method, return the method signature and nullability of its params and return values. The string should come from a repository storing 3rd party annotations. E.g. <code>"package.name.Class$NestedClass#foo(package.name.SomeClass, @Nullable package.name.OtherClass)