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.

2 lines
8.4 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>NullsafeMode (infer.Nullsafe.NullsafeMode)</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; <a href="../index.html">Nullsafe</a> &#x00BB; NullsafeMode</nav><h1>Module <code>Nullsafe.NullsafeMode</code></h1></header><aside><p>Represents a type-checking mode of nullsafe.</p></aside><div class="spec module" id="module-Trust"><a href="#module-Trust" class="anchor"></a><code><span class="keyword">module</span> <a href="Trust/index.html">Trust</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><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><table class="variant"><tr id="type-t.Default" class="anchored"><td class="def constructor"><a href="#type-t.Default" class="anchor"></a><code>| </code><code><span class="constructor">Default</span></code></td></tr><tr id="type-t.Local" class="anchored"><td class="def constructor"><a href="#type-t.Local" class="anchor"></a><code>| </code><code><span class="constructor">Local</span> <span class="keyword">of</span> <a href="Trust/index.html#type-t">Trust.t</a></code></td></tr><tr id="type-t.Strict" class="anchored"><td class="def constructor"><a href="#type-t.Strict" class="anchor"></a><code>| </code><code><span class="constructor">Strict</span></code></td></tr></table></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-of_annot"><a href="#val-of_annot" class="anchor"></a><code><span class="keyword">val</span> of_annot : <a href="../../IR/Annot/index.html#type-t">IR.Annot.t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p>Returns <code>t</code> when provided annotation matches the format of <code>@Nullsafe</code>, otherwise <code>None</code>.</p></dd></dl><dl><dt class="spec value" id="val-of_class"><a href="#val-of_class" class="anchor"></a><code><span class="keyword">val</span> of_class : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/JavaClassName/index.html#type-t">IR.JavaClassName.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Extracts mode information from class annotations</p></dd></dl><dl><dt class="spec value" id="val-of_procname"><a href="#val-of_procname" class="anchor"></a><code><span class="keyword">val</span> of_procname : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Extracts mode information from a class where procname is defined. Should be called for Java procnames only; throws otherwise</p></dd></dl><dl><dt class="spec value" id="val-of_java_procname"><a href="#val-of_java_procname" class="anchor"></a><code><span class="keyword">val</span> of_java_procname : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/Procname/Java/index.html#type-t">IR.Procname.Java.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Extracts mode information from a class where procname is defined. Should be called for Java procnames only; throws otherwise</p></dd></dl><dl><dt class="spec value" id="val-is_in_trust_list"><a href="#val-is_in_trust_list" class="anchor"></a><code><span class="keyword">val</span> is_in_trust_list : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../IR/JavaClassName/index.html#type-t">IR.JavaClassName.t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether <code>JavaClassName.t</code> is in explicit trust list specified in the mode</p></dd></dl><dl><dt class="spec value" id="val-is_stricter_than"><a href="#val-is_stricter_than" class="anchor"></a><code><span class="keyword">val</span> is_stricter_than : <span>stricter:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span>weaker:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> bool</code></dt><dd><p>Check whether <code>stricter</code> is (strongly) stricter than <code>weaker</code></p></dd></dl><dl><dt class="spec value" id="val-severity"><a href="#val-severity" class="anchor"></a><code><span class="keyword">val</span> severity : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../IBase/IssueType/index.html#type-severity">IBase.IssueType.severity</a></code></dt><dd><p>Provides a default choice of issue severity for a particular mode. Rule is: severity should be ERROR if and only if it is enforced.</p></dd></dl><dl><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></dl><dl><dt class="spec type" id="type-nested_class_annotation_problem"><a href="#type-nested_class_annotation_problem" class="anchor"></a><code><span class="keyword">type</span> nested_class_annotation_problem</code><code> = </code><table class="variant"><tr id="type-nested_class_annotation_problem.RedundantNestedClassAnnotation" class="anchored"><td class="def constructor"><a href="#type-nested_class_annotation_problem.RedundantNestedClassAnnotation" class="anchor"></a><code>| </code><code><span class="constructor">RedundantNestedClassAnnotation</span></code></td><td class="doc"><p>Nested mode is explicitly annotated exactly like the outer one.</p></td></tr><tr id="type-nested_class_annotation_problem.NestedModeIsWeaker" class="anchored"><td class="def constructor"><a href="#type-nested_class_annotation_problem.NestedModeIsWeaker" class="anchor"></a><code>| </code><code><span class="constructor">NestedModeIsWeaker</span> <span class="keyword">of</span> <a href="index.html#type-weak_type">weak_type</a></code></td><td class="doc"><p>Attempt to relax the mode imposed in the outer class.</p></td></tr></table></dt><dt class="spec type" id="type-weak_type"><a href="#type-weak_type" class="anchor"></a><code><span class="keyword">and</span> weak_type</code><code> = </code><table class="variant"><tr id="type-weak_type.ExtraTrustClass" class="anchored"><td class="def constructor"><a href="#type-weak_type.ExtraTrustClass" class="anchor"></a><code>| </code><code><span class="constructor">ExtraTrustClass</span> <span class="keyword">of</span> <span><a href="../../IR/JavaClassName/index.html#type-t">IR.JavaClassName.t</a> list</span></code></td><td class="doc"><p>Nested class has this extra list of classes</p></td></tr><tr id="type-weak_type.Other" class="anchored"><td class="def constructor"><a href="#type-weak_type.Other" class="anchor"></a><code>| </code><code><span class="constructor">Other</span></code></td></tr></table></dt></dl><dl><dt class="spec value" id="val-check_problematic_class_annotation"><a href="#val-check_problematic_class_annotation" class="anchor"></a><code><span class="keyword">val</span> check_problematic_class_annotation : <a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span>&#45;&gt;</span> <a href="../../IR/JavaClassName/index.html#type-t">IR.JavaClassName.t</a> <span>&#45;&gt;</span> <span><span>(unit, <a href="index.html#type-nested_class_annotation_problem">nested_class_annotation_problem</a>)</span> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dd><p>Given a (not anonymous) class name, check if there are semantic problems with <code>@Nullsafe</code> mode annotation for this class</p></dd></dl></div></body></html>