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
15 KiB

This file contains ambiguous Unicode 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>JSourceFileInfo (infer.JavaFrontend.JSourceFileInfo)</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">JavaFrontend</a> &#x00BB; JSourceFileInfo</nav><h1>Module <code>JavaFrontend.JSourceFileInfo</code></h1></header><div class="spec module" id="module-Array"><a href="#module-Array" class="anchor"></a><code><span class="keyword">module</span> <a href="Array/index.html">Array</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><dl><dt class="spec value" id="val-incr_linenum"><a href="#val-incr_linenum" class="anchor"></a><code><span class="keyword">val</span> incr_linenum : Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dd><p>classic Ocamllex function to update current lexbuf line at each end of line</p></dd></dl><dl><dt class="spec value" id="val-end_pos"><a href="#val-end_pos" class="anchor"></a><code><span class="keyword">val</span> end_pos : Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int * int</code></dt><dd><p>position of the char just after lexbuf</p></dd></dl><dl><dt class="spec value" id="val-location_suffix"><a href="#val-location_suffix" class="anchor"></a><code><span class="keyword">val</span> location_suffix : string <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int * int</code></dt><dd><p>return the exact position start of the suffix <code>classname</code> in <code>lexbuf</code></p></dd></dl><dl><dt class="spec value" id="val-location_start"><a href="#val-location_start" class="anchor"></a><code><span class="keyword">val</span> location_start : Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int * int</code></dt><dd><p>return the position start of <code>lexbuf</code></p></dd></dl><dl><dt class="spec type" id="type-expr"><a href="#type-expr" class="anchor"></a><code><span class="keyword">type</span> expr</code><code> = </code><table class="variant"><tr id="type-expr.AllocExpr" class="anchored"><td class="def constructor"><a href="#type-expr.AllocExpr" class="anchor"></a><code>| </code><code><span class="constructor">AllocExpr</span></code></td></tr><tr id="type-expr.OtherExpr" class="anchored"><td class="def constructor"><a href="#type-expr.OtherExpr" class="anchor"></a><code>| </code><code><span class="constructor">OtherExpr</span></code></td></tr></table></dt><dd><p>We traverse the structure of the source file by recording the encompassing blocks in a stack of frame. We use the stack to recover the full inner class name at bytecode level</p></dd></dl><dl><dt class="spec type" id="type-frame"><a href="#type-frame" class="anchor"></a><code><span class="keyword">type</span> frame</code><code> = </code><code>{</code><table class="record"><tr id="type-frame.short_class_name" class="anchored"><td class="def field"><a href="#type-frame.short_class_name" class="anchor"></a><code>short_class_name : string;</code></td></tr><tr id="type-frame.is_enum" class="anchored"><td class="def field"><a href="#type-frame.is_enum" class="anchor"></a><code>is_enum : bool;</code></td></tr><tr id="type-frame.next_anonymous_class" class="anchored"><td class="def field"><a href="#type-frame.next_anonymous_class" class="anchor"></a><code>next_anonymous_class : int;</code></td></tr><tr id="type-frame.opened_blocks" class="anchored"><td class="def field"><a href="#type-frame.opened_blocks" class="anchor"></a><code>opened_blocks : int;</code></td></tr><tr id="type-frame.exprs" class="anchored"><td class="def field"><a href="#type-frame.exprs" class="anchor"></a><code>exprs : <span><a href="index.html#type-expr">expr</a> list</span>;</code></td></tr></table><code>}</code></dt><dt class="spec type" id="type-state"><a href="#type-state" class="anchor"></a><code><span class="keyword">type</span> state</code><code> = </code><code>{</code><table class="record"><tr id="type-state.stack" class="anchored"><td class="def field"><a href="#type-state.stack" class="anchor"></a><code>stack : <span><a href="index.html#type-frame">frame</a> list</span>;</code></td></tr><tr id="type-state.record_location" class="anchored"><td class="def field"><a href="#type-state.record_location" class="anchor"></a><code>record_location : <span>classname:string</span> <span>&#45;&gt;</span> <span>col:int</span> <span>&#45;&gt;</span> <span>line:int</span> <span>&#45;&gt;</span> unit;</code></td></tr></table><code>}</code></dt></dl><dl><dt class="spec value" id="val-push"><a href="#val-push" class="anchor"></a><code><span class="keyword">val</span> push : <a href="index.html#type-frame">frame</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt></dl><dl><dt class="spec exception" id="exception-Missing_opening_bracket"><a href="#exception-Missing_opening_bracket" class="anchor"></a><code><span class="keyword">exception</span> </code><code><span class="exception">Missing_opening_bracket</span></code></dt><dt class="spec exception" id="exception-Missing_opening_parenthesis"><a href="#exception-Missing_opening_parenthesis" class="anchor"></a><code><span class="keyword">exception</span> </code><code><span class="exception">Missing_opening_parenthesis</span></code></dt></dl><dl><dt class="spec value" id="val-add_package"><a href="#val-add_package" class="anchor"></a><code><span class="keyword">val</span> add_package : string <span>&#45;&gt;</span> <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-pop_class"><a href="#val-pop_class" class="anchor"></a><code><span class="keyword">val</span> pop_class : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-incr_next_anonymous"><a href="#val-incr_next_anonymous" class="anchor"></a><code><span class="keyword">val</span> incr_next_anonymous : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-add_expr"><a href="#val-add_expr" class="anchor"></a><code><span class="keyword">val</span> add_expr : <a href="index.html#type-expr">expr</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-pop_exprs"><a href="#val-pop_exprs" class="anchor"></a><code><span class="keyword">val</span> pop_exprs : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-expr">expr</a> * <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-in_field_declaration_area"><a href="#val-in_field_declaration_area" class="anchor"></a><code><span class="keyword">val</span> in_field_declaration_area : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-get_opened_blocks"><a href="#val-get_opened_blocks" class="anchor"></a><code><span class="keyword">val</span> get_opened_blocks : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-is_enum"><a href="#val-is_enum" class="anchor"></a><code><span class="keyword">val</span> is_enum : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-get_next_anonymous_class"><a href="#val-get_next_anonymous_class" class="anchor"></a><code><span class="keyword">val</span> get_next_anonymous_class : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> string</code></dt><dt class="spec value" id="val-decr_opened_blocks"><a href="#val-decr_opened_blocks" class="anchor"></a><code><span class="keyword">val</span> decr_opened_blocks : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-incr_opened_blocks"><a href="#val-incr_opened_blocks" class="anchor"></a><code><span class="keyword">val</span> incr_opened_blocks : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dt class="spec value" id="val-long_class_name"><a href="#val-long_class_name" class="anchor"></a><code><span class="keyword">val</span> long_class_name : string <span>&#45;&gt;</span> <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> string</code></dt><dt class="spec value" id="val-__ocaml_lex_tables"><a href="#val-__ocaml_lex_tables" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_tables : Stdlib.Lexing.lex_tables</code></dt><dt class="spec value" id="val-class_scan"><a href="#val-class_scan" class="anchor"></a><code><span class="keyword">val</span> class_scan : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_class_scan_rec"><a href="#val-__ocaml_lex_class_scan_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_class_scan_rec : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-do_at_next_left_bracket"><a href="#val-do_at_next_left_bracket" class="anchor"></a><code><span class="keyword">val</span> do_at_next_left_bracket : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_do_at_next_left_bracket_rec"><a href="#val-__ocaml_lex_do_at_next_left_bracket_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_do_at_next_left_bracket_rec : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-search_anonymous_class_body"><a href="#val-search_anonymous_class_body" class="anchor"></a><code><span class="keyword">val</span> search_anonymous_class_body : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_search_anonymous_class_body_rec"><a href="#val-__ocaml_lex_search_anonymous_class_body_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_search_anonymous_class_body_rec : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-found_entrance_of_anonymous_class"><a href="#val-found_entrance_of_anonymous_class" class="anchor"></a><code><span class="keyword">val</span> found_entrance_of_anonymous_class : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_found_entrance_of_anonymous_class_rec"><a href="#val-__ocaml_lex_found_entrance_of_anonymous_class_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_found_entrance_of_anonymous_class_rec : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-skip_well_parenthesized_angles"><a href="#val-skip_well_parenthesized_angles" class="anchor"></a><code><span class="keyword">val</span> skip_well_parenthesized_angles : Core_kernel__Int.t <span>&#45;&gt;</span> <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_skip_well_parenthesized_angles_rec"><a href="#val-__ocaml_lex_skip_well_parenthesized_angles_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_skip_well_parenthesized_angles_rec : Core_kernel__Int.t <span>&#45;&gt;</span> <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-skip_well_parenthesized_parentheses"><a href="#val-skip_well_parenthesized_parentheses" class="anchor"></a><code><span class="keyword">val</span> skip_well_parenthesized_parentheses : Core_kernel__Int.t <span>&#45;&gt;</span> <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_skip_well_parenthesized_parentheses_rec"><a href="#val-__ocaml_lex_skip_well_parenthesized_parentheses_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_skip_well_parenthesized_parentheses_rec : Core_kernel__Int.t <span>&#45;&gt;</span> <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-skip_string"><a href="#val-skip_string" class="anchor"></a><code><span class="keyword">val</span> skip_string : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_skip_string_rec"><a href="#val-__ocaml_lex_skip_string_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_skip_string_rec : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-skip_comments"><a href="#val-skip_comments" class="anchor"></a><code><span class="keyword">val</span> skip_comments : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-__ocaml_lex_skip_comments_rec"><a href="#val-__ocaml_lex_skip_comments_rec" class="anchor"></a><code><span class="keyword">val</span> __ocaml_lex_skip_comments_rec : <span>(Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> Stdlib.Lexing.lexbuf <span>&#45;&gt;</span> int <span>&#45;&gt;</span> unit</code></dt></dl><dl><dt class="spec value" id="val-collect_class_location"><a href="#val-collect_class_location" class="anchor"></a><code><span class="keyword">val</span> collect_class_location : <a href="../JClasspath/index.html#type-program">JClasspath.program</a> <span>&#45;&gt;</span> <a href="../../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> <span>&#45;&gt;</span> Base.unit</code></dt><dd><p>We scan source file <code>file</code> and record location of each class declaration</p></dd></dl><dl><dt class="spec value" id="val-debug_on_file"><a href="#val-debug_on_file" class="anchor"></a><code><span class="keyword">val</span> debug_on_file : <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt></dl></div></body></html>