<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>ThirdPartyMethod (infer.Nullsafe.ThirdPartyMethod)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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; ThirdPartyMethod</nav><h1>Module <code>Nullsafe.ThirdPartyMethod</code></h1></header><aside><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></aside><dl><dt class="spec type" id="type-fully_qualified_type"><a href="#type-fully_qualified_type" class="anchor"></a><code><span class="keyword">type</span> fully_qualified_type</code><code> = string</code></dt><dd><p>E.g. &quot;full.package.name.TypeName$NestedTypeName1$NestedTypeName2&quot;</p></dd></dl><dl><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="index.html#type-fully_qualified_type">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="index.html#type-method_name">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="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><dt class="spec type" id="type-method_name"><a href="#type-method_name" class="anchor"></a><code><span class="keyword">and</span> method_name</code><code> = </code><table class="variant"><tr id="type-method_name.Constructor" class="anchored"><td class="def constructor"><a href="#type-method_name.Constructor" class="anchor"></a><code>| </code><code><span class="constructor">Constructor</span></code></td></tr><tr id="type-method_name.Method" class="anchored"><td class="def constructor"><a href="#type-method_name.Method" class="anchor"></a><code>| </code><code><span class="constructor">Method</span> <span class="keyword">of</span> string</code></td></tr></table></dt></dl><dl><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>&#45;&gt;</span> <a href="index.html#type-unique_repr">unique_repr</a></code></dt><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>&#45;&gt;</span> <a href="index.html#type-unique_repr">unique_repr</a> <span>&#45;&gt;</span> unit</code></dt></dl><dl><dt class="spec type" id="type-nullability"><a href="#type-nullability" class="anchor"></a><code><span class="keyword">type</span> nullability</code><code> = </code><code>{</code><table class="record"><tr id="type-nullability.ret_nullability" class="anchored"><td class="def field"><a href="#type-nullability.ret_nullability" class="anchor"></a><code>ret_nullability : <a href="index.html#type-type_nullability">type_nullability</a>;</code></td></tr><tr id="type-nullability.param_nullability" class="anchored"><td class="def field"><a href="#type-nullability.param_nullability" class="anchor"></a><code>param_nullability : <span><a href="index.html#type-type_nullability">type_nullability</a> list</span>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-type_nullability"><a href="#type-type_nullability" class="anchor"></a><code><span class="keyword">and</span> type_nullability</code><code> = </code><table class="variant"><tr id="type-type_nullability.Nullable" class="anchored"><td class="def constructor"><a href="#type-type_nullability.Nullable" class="anchor"></a><code>| </code><code><span class="constructor">Nullable</span></code></td></tr><tr id="type-type_nullability.Nonnull" class="anchored"><td class="def constructor"><a href="#type-type_nullability.Nonnull" class="anchor"></a><code>| </code><code><span class="constructor">Nonnull</span></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-pp_nullability"><a href="#val-pp_nullability" class="anchor"></a><code><span class="keyword">val</span> pp_nullability : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-nullability">nullability</a> <span>&#45;&gt;</span> unit</code></dt></dl><dl><dt class="spec type" id="type-parsing_error"><a href="#type-parsing_error" class="anchor"></a><code><span class="keyword">type</span> parsing_error</code></dt></dl><dl><dt class="spec value" id="val-string_of_parsing_error"><a href="#val-string_of_parsing_error" class="anchor"></a><code><span class="keyword">val</span> string_of_parsing_error : <a href="index.html#type-parsing_error">parsing_error</a> <span>&#45;&gt;</span> string</code></dt><dt class="spec value" id="val-parse"><a href="#val-parse" class="anchor"></a><code><span class="keyword">val</span> parse : string <span>&#45;&gt;</span> <span><span>(<a href="index.html#type-unique_repr">unique_repr</a> * <a href="index.html#type-nullability">nullability</a>, <a href="index.html#type-parsing_error">parsing_error</a>)</span> <a href="../../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>&quot;package.name.Class$NestedClass#foo(package.name.SomeClass, @Nullable package.name.OtherClass)
    @Nullable&quot;</code></p></dd></dl><dl><dt class="spec value" id="val-pp_parse_result"><a href="#val-pp_parse_result" class="anchor"></a><code><span class="keyword">val</span> pp_parse_result : Stdlib.Format.formatter <span>&#45;&gt;</span> <span>(<a href="index.html#type-unique_repr">unique_repr</a> * <a href="index.html#type-nullability">nullability</a>)</span> <span>&#45;&gt;</span> unit</code></dt></dl></div></body></html>