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>ThirdPartyMethod (infer.Nullsafe.ThirdPartyMethod)</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>» 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><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = </code><code>{</code><tableclass="record"><trid="type-t.class_name"class="anchored"><tdclass="def field"><ahref="#type-t.class_name"class="anchor"></a><code>class_name : <ahref="index.html#type-fully_qualified_type">fully_qualified_type</a>;</code></td></tr><trid="type-t.method_name"class="anchored"><tdclass="def field"><ahref="#type-t.method_name"class="anchor"></a><code>method_name : <ahref="index.html#type-method_name">method_name</a>;</code></td></tr><trid="type-t.ret_nullability"class="anchored"><tdclass="def field"><ahref="#type-t.ret_nullability"class="anchor"></a><code>ret_nullability : <ahref="index.html#type-type_nullability">type_nullability</a>;</code></td></tr><trid="type-t.params"class="anchored"><tdclass="def field"><ahref="#type-t.params"class="anchor"></a><code>params : <span><span>(<ahref="index.html#type-fully_qualified_type">fully_qualified_type</a> * <ahref="index.html#type-type_nullability">type_nullability</a>)</span> list</span>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-fully_qualified_type"><ahref="#type-fully_qualified_type"class="anchor"></a><code><spanclass="keyword">and</span> fully_qualified_type</code><code> = string</code></dt><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><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><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-sexp_of_t"><ahref="#val-sexp_of_t"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_t : <ahref="index.html#type-t">t</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_fully_qualified_type"><ahref="#val-sexp_of_fully_qualified_type"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_fully_qualified_type : <ahref="index.html#type-fully_qualified_type">fully_qualified_type</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_method_name"><ahref="#val-sexp_of_method_name"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_method_name : <ahref="index.html#type-method_name">method_name</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_type_nullability"><ahref="#val-sexp_of_type_nullability"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_type_nullability : <ahref="index.html#type-type_nullability">type_nullability</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-t_of_sexp"><ahref="#val-t_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-fully_qualified_type_of_sexp"><ahref="#val-fully_qualified_type_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dtclass="spec value"id="val-method_name_of_sexp"><ahref="#val-method_name_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-method_name">method_name</a></code></dt><dtclass="spec value"id="val-type_nullability_of_sexp"><ahref="#val-type_nullability_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-type_nullability">type_nullability</a></code></dt><dtclass="spec value"id="val-sexp_of_t"><ahref="#val-sexp_of_t"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_t : <ahref="index.html#type-t">t</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_fully_qualified_type"><ahref="#val-sexp_of_fully_qualified_type"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_fully_qualified_type : <ahref="index.html#type-fully_qualified_type">fully_qualified_type</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_method_name"><ahref="#val-sexp_of_method_name"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_method_name : <ahref="index.html#type-method_name">method_name</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_type_nullability"><ahref="#val-sexp_of_type_nullability"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_type_nullability : <ahref="index.html#type-type_nullability">type_nullability</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-t_of_sexp"><ahref="#val-t_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-fully_qualified_type_of_sexp"><ahref="#val-fully_qualified_type_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dtclass="spec value"id="val-method_name_of_sexp"><ahref="#val-method_name_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-method_name">method_name</a></code></dt><dtclass="spec value"id="val-type_nullability_of_sexp"><ahref="#val-type_nullability_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-type_nullability">type_nullability</a></code></dt><dtclass="spec value"id="val-sexp_of_t"><ahref="#val-sexp_of_t"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_t : <ahref="index.html#type-t">t</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_fully_qualified_type"><ahref="#val-sexp_of_fully_qualified_type"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_fully_qualified_type : <ahref="index.html#type-fully_qualified_type">fully_qualified_type</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_method_name"><ahref="#val-sexp_of_method_name"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_method_name : <ahref="index.html#type-method_name">method_name</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-sexp_of_type_nullability"><ahref="#val-sexp_of_type_nullability"class="anchor"></a><code><spanclass="keyword">val</span> sexp_of_type_nullability : <ahref="index.html#type-type_nullability">type_nullability</a><span>-></span> Ppx_sexp_conv_lib.Sexp.t</code></dt><dtclass="spec value"id="val-t_of_sexp"><ahref="#val-t_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> t_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-t">t</a></code></dt><dtclass="spec value"id="val-fully_qualified_type_of_sexp"><ahref="#val-fully_qualified_type_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> fully_qualified_type_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-fully_qualified_type">fully_qualified_type</a></code></dt><dtclass="spec value"id="val-method_name_of_sexp"><ahref="#val-method_name_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> method_name_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-method_name">method_name</a></code></dt><dtclass="spec value"id="val-type_nullability_of_sexp"><ahref="#val-type_nullability_of_sexp"class="anchor"></a><code><spanclass="keyword">val</span> type_nullability_of_sexp : Ppx_sexp_conv_lib.Sexp.t <span>-></span><ahref="index.html#type-type_nullability">type_nullability</a></code></dt></dl></div></div></div><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-t">t</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)
@Nullable"</code></p></dd></dl><dl><dtclass="spec value"id="val-to_canonical_string"><ahref="#val-to_canonical_string"class="anchor"></a><code><spanclass="keyword">val</span> to_canonical_string : <ahref="index.html#type-t">t</a><span>-></span> string</code></dt><dtclass="spec value"id="val-pp"><ahref="#val-pp"class="anchor"></a><code><spanclass="keyword">val</span> pp : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>String representation as it can be parsed via <code>parse</code><Class>#<method>(<params>)<ret_nullability></p></dd></dl></div></body></html>