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>Annotations (infer.InferModules.Annotations)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><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">InferModules</a>» Annotations</nav><h1>Module <code>InferModules.Annotations</code></h1></header><aside><p>Annotations.</p></aside><dl><dtclass="spec value"id="val-any_thread"><ahref="#val-any_thread"class="anchor"></a><code><spanclass="keyword">val</span> any_thread : string</code></dt><dtclass="spec value"id="val-auto_cleanup"><ahref="#val-auto_cleanup"class="anchor"></a><code><spanclass="keyword">val</span> auto_cleanup : string</code></dt><dtclass="spec value"id="val-expensive"><ahref="#val-expensive"class="anchor"></a><code><spanclass="keyword">val</span> expensive : string</code></dt><dtclass="spec value"id="val-inject_prop"><ahref="#val-inject_prop"class="anchor"></a><code><spanclass="keyword">val</span> inject_prop : string</code></dt><dtclass="spec value"id="val-no_allocation"><ahref="#val-no_allocation"class="anchor"></a><code><spanclass="keyword">val</span> no_allocation : string</code></dt><dtclass="spec value"id="val-nullable"><ahref="#val-nullable"class="anchor"></a><code><spanclass="keyword">val</span> nullable : string</code></dt><dtclass="spec value"id="val-nonnull"><ahref="#val-nonnull"class="anchor"></a><code><spanclass="keyword">val</span> nonnull : string</code></dt><dtclass="spec value"id="val-performance_critical"><ahref="#val-performance_critical"class="anchor"></a><code><spanclass="keyword">val</span> performance_critical : string</code></dt><dtclass="spec value"id="val-present"><ahref="#val-present"class="anchor"></a><code><spanclass="keyword">val</span> present : string</code></dt><dtclass="spec value"id="val-prop"><ahref="#val-prop"class="anchor"></a><code><spanclass="keyword">val</span> prop : string</code></dt><dtclass="spec value"id="val-for_non_ui_thread"><ahref="#val-for_non_ui_thread"class="anchor"></a><code><spanclass="keyword">val</span> for_non_ui_thread : string</code></dt><dtclass="spec value"id="val-for_ui_thread"><ahref="#val-for_ui_thread"class="anchor"></a><code><spanclass="keyword">val</span> for_ui_thread : string</code></dt><dtclass="spec value"id="val-guarded_by"><ahref="#val-guarded_by"class="anchor"></a><code><spanclass="keyword">val</span> guarded_by : string</code></dt><dtclass="spec value"id="val-suppress_lint"><ahref="#val-suppress_lint"class="anchor"></a><code><spanclass="keyword">val</span> suppress_lint : string</code></dt><dtclass="spec value"id="val-thread_confined"><ahref="#val-thread_confined"class="anchor"></a><code><spanclass="keyword">val</span> thread_confined : string</code></dt><dtclass="spec value"id="val-thread_safe"><ahref="#val-thread_safe"class="anchor"></a><code><spanclass="keyword">val</span> thread_safe : string</code></dt><dtclass="spec value"id="val-mainthread"><ahref="#val-mainthread"class="anchor"></a><code><spanclass="keyword">val</span> mainthread : string</code></dt><dtclass="spec value"id="val-ui_thread"><ahref="#val-ui_thread"class="anchor"></a><code><spanclass="keyword">val</span> ui_thread : string</code></dt><dtclass="spec value"id="val-worker_thread"><ahref="#val-worker_thread"class="anchor"></a><code><spanclass="keyword">val</span> worker_thread : string</code></dt><dtclass="spec value"id="val-visibleForTesting"><ahref="#val-visibleForTesting"class="anchor"></a><code><spanclass="keyword">val</span> visibleForTesting : string</code></dt><dtclass="spec value"id="val-generated_graphql"><ahref="#val-generated_graphql"class="anchor"></a><code><spanclass="keyword">val</span> generated_graphql : string</code></dt><dtclass="spec value"id="val-get_annot_ending"><ahref="#val-get_annot_ending"class="anchor"></a><code><spanclass="keyword">val</span> get_annot_ending : <ahref="../../../InferIR/InferIR/Annot/index.html#type-t">InferIR.Annot.t</a><span>-></span> string</code></dt><dd><p>get the '.'-last component of an annotation</p></dd></dl><dl><dtclass="spec value"id="val-annot_ends_with"><ahref="#val-annot_ends_with"class="anchor"></a><code><spanclass="keyword">val</span> annot_ends_with : <ahref="../../../InferIR/InferIR/Annot/index.html#type-t">InferIR.Annot.t</a><span>-></span> string <span>-></span> bool</code></dt><dd><p><code>annot_ends_with annot ann_name</code> returns true if the class name of <code>annot</code>, without the package, is equal to <code>ann_name</code></p></dd></dl><dl><dtclass="spec value"id="val-ia_ends_with"><ahref="#val-ia_ends_with"class="anchor"></a><code><spanclass="keyword">val</span> ia_ends_with : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> string <span>-></span> bool</code></dt><dd><p>Check if there is an annotation in <code>ia</code> which ends with the given name</p></dd></dl><dl><dtclass="spec value"id="val-ia_has_annotation_with"><ahref="#val-ia_has_annotation_with"class="anchor"></a><code><spanclass="keyword">val</span> ia_has_annotation_with : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/index.html#type-t">InferIR.Annot.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_false_on_null"><ahref="#val-ia_is_false_on_null"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_false_on_null : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_initializer"><ahref="#val-ia_is_initializer"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_initializer : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_cleanup"><ahref="#val-ia_is_cleanup"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_cleanup : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_field_injector_readonly"><ahref="#val-ia_is_field_injector_readonly"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_field_injector_readonly : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dd><p>Annotations for readonly injectors. The injector framework initializes the field but does not write null into it.</p></dd></dl><dl><dtclass="spec value"id="val-ia_is_field_injector_readwrite"><ahref="#val-ia_is_field_injector_readwrite"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_field_injector_readwrite : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dd><p>Annotations for read-write injectors. The injector framework initializes the field and can write null into it.</p></dd></dl><dl><dtclass="spec value"id="val-ia_is_mutable"><ahref="#val-ia_is_mutable"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_mutable : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_nonnull"><ahref="#val-ia_is_nonnull"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_nonnull : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_nullable"><ahref="#val-ia_is_nullable"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_nullable : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_present"><ahref="#val-ia_is_present"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_present : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_true_on_null"><ahref="#val-ia_is_true_on_null"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_true_on_null : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_verify"><ahref="#val-ia_is_verify"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_verify : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_expensive"><ahref="#val-ia_is_expensive"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_expensive : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_functional"><ahref="#val-ia_is_functional"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_functional : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_propagates_nullable"><ahref="#val-ia_is_propagates_nullable"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_propagates_nullable : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_ignore_allocations"><ahref="#val-ia_is_ignore_allocations"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_ignore_allocations : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_inject"><ahref="#val-ia_is_inject"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_inject : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_suppress_lint"><ahref="#val-ia_is_suppress_lint"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_suppress_lint : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_not_thread_safe"><ahref="#val-ia_is_not_thread_safe"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_not_thread_safe : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_nonblocking"><ahref="#val-ia_is_nonblocking"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_nonblocking : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_returns_ownership"><ahref="#val-ia_is_returns_ownership"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_returns_ownership : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_synchronized_collection"><ahref="#val-ia_is_synchronized_collection"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_synchronized_collection : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_thread_safe"><ahref="#val-ia_is_thread_safe"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_thread_safe : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_thread_confined"><ahref="#val-ia_is_thread_confined"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_thread_confined : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_thrift_service"><ahref="#val-ia_is_thrift_service"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_thrift_service : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_volatile"><ahref="#val-ia_is_volatile"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_volatile : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-ia_is_worker_thread"><ahref="#val-ia_is_worker_thread"class="anchor"></a><code><spanclass="keyword">val</span> ia_is_worker_thread : <ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-pdesc_get_return_annot"><ahref="#val-pdesc_get_return_annot"class="anchor"></a><code><spanclass="keyword">val</span> pdesc_get_return_annot : <ahref="../../../InferIR/InferIR/Procdesc/index.html#type-t">InferIR.Procdesc.t</a><span>-></span><ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a></code></dt><dd><p>get the list of annotations on the return value of <code>pdesc</code></p></dd></dl><dl><dtclass="spec value"id="val-pdesc_has_return_annot"><ahref="#val-pdesc_has_return_annot"class="anchor"></a><code><spanclass="keyword">val</span> pdesc_has_return_annot : <ahref="../../../InferIR/InferIR/Procdesc/index.html#type-t">InferIR.Procdesc.t</a><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dd><p>return true if the given predicate evaluates to true on the annotation of <code>pdesc</code>'s return value</p></dd></dl><dl><dtclass="spec value"id="val-pname_has_return_annot"><ahref="#val-pname_has_return_annot"class="anchor"></a><code><spanclass="keyword">val</span> pname_has_return_annot : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span>attrs_of_pname:<span>(<ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a> option</span>)</span></span><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dd><p>return true if the given predicate evaluates to true on the annotation of <code>pname</code>'s return value. the function <code>attrs_of_pname</code> should resolve the proc attributes of <code>pname</code>. Specs.proc_resolve_attributes is a good choice for this resolution function.</p></dd></dl><dl><dtclass="spec value"id="val-pdesc_return_annot_ends_with"><ahref="#val-pdesc_return_annot_ends_with"class="anchor"></a><code><spanclass="keyword">val</span> pdesc_return_annot_ends_with : <ahref="../../../InferIR/InferIR/Procdesc/index.html#type-t">InferIR.Procdesc.t</a><span>-></span> string <span>-></span> bool</code></dt><dd><p>return true if <code>pdesc</code>'s return value is annotated with a value ending with the given string</p></dd></dl><dl><dtclass="spec value"id="val-ma_has_annotation_with"><ahref="#val-ma_has_annotation_with"class="anchor"></a><code><spanclass="keyword">val</span> ma_has_annotation_with : <ahref="../../../InferIR/InferIR/Annot/Method/index.html#type-t">InferIR.Annot.Method.t</a><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/index.html#type-t">InferIR.Annot.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dtclass="spec value"id="val-field_has_annot"><ahref="#val-field_has_annot"class="anchor"></a><code><spanclass="keyword">val</span> field_has_annot : <ahref="../../../InferIR/InferIR/Typ/Fieldname/index.html#type-t">InferIR.Typ.Fieldname.t</a><span>-></span><ahref="../../../InferIR/InferIR/Typ/Struct/index.html#type-t">InferIR.Typ.Struct.t</a><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dtclass="spec value"id="val-struct_typ_has_annot"><ahref="#val-struct_typ_has_annot"class="anchor"></a><code><spanclass="keyword">val</span> struct_typ_has_annot : <ahref="../../../InferIR/InferIR/Typ/Struct/index.html#type-t">InferIR.Typ.Struct.t</a><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span> bool</code></dt><dd><p>return true if the given predicate evaluates to true on some annotation of <code>struct_typ</code></p></dd></dl></div></body></html>