You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
12 KiB

This file contains invisible Unicode characters!

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>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Nullsafe__ThirdPartyMethod (infer.Nullsafe__ThirdPartyMethod)</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> &#x00BB; 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><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><code>{</code><table class="record"><tr id="type-t.class_name" class="anchored"><td class="def field"><a href="#type-t.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-t.method_name" class="anchored"><td class="def field"><a href="#type-t.method_name" class="anchor"></a><code>method_name : <a href="index.html#type-method_name">method_name</a>;</code></td></tr><tr id="type-t.ret_nullability" class="anchored"><td class="def field"><a href="#type-t.ret_nullability" class="anchor"></a><code>ret_nullability : <a href="index.html#type-type_nullability">type_nullability</a>;</code></td></tr><tr id="type-t.params" class="anchored"><td class="def field"><a href="#type-t.params" class="anchor"></a><code>params : <span><span>(<a href="index.html#type-fully_qualified_type">fully_qualified_type</a> * <a href="index.html#type-type_nullability">type_nullability</a>)</span> list</span>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-fully_qualified_type"><a href="#type-fully_qualified_type" class="anchor"></a><code><span class="keyword">and</span> fully_qualified_type</code><code> = string</code></dt><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><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><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span class="keyword">val</span> sexp_of_t : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_fully_qualified_type"><a href="#val-sexp_of_fully_qualified_type" class="anchor"></a><code><span class="keyword">val</span> sexp_of_fully_qualified_type : <a href="index.html#type-fully_qualified_type">fully_qualified_type</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_method_name"><a href="#val-sexp_of_method_name" class="anchor"></a><code><span class="keyword">val</span> sexp_of_method_name : <a href="index.html#type-method_name">method_name</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_type_nullability"><a href="#val-sexp_of_type_nullability" class="anchor"></a><code><span class="keyword">val</span> sexp_of_type_nullability : <a href="index.html#type-type_nullability">type_nullability</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span class="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-fully_qualified_type_of_sexp"><a href="#val-fully_qualified_type_of_sexp" class="anchor"></a><code><span class="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dt class="spec value" id="val-method_name_of_sexp"><a href="#val-method_name_of_sexp" class="anchor"></a><code><span class="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-method_name">method_name</a></code></dt><dt class="spec value" id="val-type_nullability_of_sexp"><a href="#val-type_nullability_of_sexp" class="anchor"></a><code><span class="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-type_nullability">type_nullability</a></code></dt><dt class="spec value" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span class="keyword">val</span> sexp_of_t : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_fully_qualified_type"><a href="#val-sexp_of_fully_qualified_type" class="anchor"></a><code><span class="keyword">val</span> sexp_of_fully_qualified_type : <a href="index.html#type-fully_qualified_type">fully_qualified_type</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_method_name"><a href="#val-sexp_of_method_name" class="anchor"></a><code><span class="keyword">val</span> sexp_of_method_name : <a href="index.html#type-method_name">method_name</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_type_nullability"><a href="#val-sexp_of_type_nullability" class="anchor"></a><code><span class="keyword">val</span> sexp_of_type_nullability : <a href="index.html#type-type_nullability">type_nullability</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span class="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-fully_qualified_type_of_sexp"><a href="#val-fully_qualified_type_of_sexp" class="anchor"></a><code><span class="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dt class="spec value" id="val-method_name_of_sexp"><a href="#val-method_name_of_sexp" class="anchor"></a><code><span class="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-method_name">method_name</a></code></dt><dt class="spec value" id="val-type_nullability_of_sexp"><a href="#val-type_nullability_of_sexp" class="anchor"></a><code><span class="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-type_nullability">type_nullability</a></code></dt><dt class="spec value" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span class="keyword">val</span> sexp_of_t : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_fully_qualified_type"><a href="#val-sexp_of_fully_qualified_type" class="anchor"></a><code><span class="keyword">val</span> sexp_of_fully_qualified_type : <a href="index.html#type-fully_qualified_type">fully_qualified_type</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_method_name"><a href="#val-sexp_of_method_name" class="anchor"></a><code><span class="keyword">val</span> sexp_of_method_name : <a href="index.html#type-method_name">method_name</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-sexp_of_type_nullability"><a href="#val-sexp_of_type_nullability" class="anchor"></a><code><span class="keyword">val</span> sexp_of_type_nullability : <a href="index.html#type-type_nullability">type_nullability</a> <span>&#45;&gt;</span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dt class="spec value" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span class="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-fully_qualified_type_of_sexp"><a href="#val-fully_qualified_type_of_sexp" class="anchor"></a><code><span class="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dt class="spec value" id="val-method_name_of_sexp"><a href="#val-method_name_of_sexp" class="anchor"></a><code><span class="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-method_name">method_name</a></code></dt><dt class="spec value" id="val-type_nullability_of_sexp"><a href="#val-type_nullability_of_sexp" class="anchor"></a><code><span class="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>&#45;&gt;</span> <a href="index.html#type-type_nullability">type_nullability</a></code></dt></dl></div></div></div><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-t">t</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-to_canonical_string"><a href="#val-to_canonical_string" class="anchor"></a><code><span class="keyword">val</span> to_canonical_string : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>String representation as it can be parsed via <code>parse</code> &lt;Class&gt;#&lt;method&gt;(&lt;params&gt;)&lt;ret_nullability&gt;</p></dd></dl></div></body></html>