Skip to content

Commit fe57f69

Browse files
author
thk123
committed
Structure the documentation in load_java_class
Put the main documention on the method that does the work. Have overloads reference the methods they call with the specialisation they provide.
1 parent 5fc12b7 commit fe57f69

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

jbmc/unit/java-testing-utils/load_java_class.cpp

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,8 @@ symbol_tablet load_java_class_lazy(
4444
java_class_name, class_path, main, get_language_from_mode(ID_java));
4545
}
4646

47-
/// Go through the process of loading, type-checking and finalising loading a
48-
/// specific class file to build the symbol table.
49-
/// \param java_class_name: The name of the class file to load. It should not
50-
/// include the .class extension.
51-
/// \param class_path: The path to load the class from. Should be relative to
52-
/// the unit directory.
53-
/// \param main: The name of the main function or "" to use the default
54-
/// behaviour to find a main function.
55-
/// \return The symbol table that is generated by parsing this file.
47+
/// Returns the symbol table from
48+
/// \ref load_goto_model_from_java_class(const std::string &java_class_name, const std::string &class_path, const std::string &main) // NOLINT
5649
symbol_tablet load_java_class(
5750
const std::string &java_class_name,
5851
const std::string &class_path,
@@ -62,17 +55,7 @@ symbol_tablet load_java_class(
6255
->get_symbol_table();
6356
}
6457

65-
/// Go through the process of loading, type-checking and finalising loading a
66-
/// specific class file to build the symbol table.
67-
/// \param java_class_name: The name of the class file to load. It should not
68-
/// include the .class extension.
69-
/// \param class_path: The path to load the class from. Should be relative to
70-
/// the unit directory.
71-
/// \param main: The name of the main function or "" to use the default
72-
/// behaviour to find a main function.
73-
/// \param java_lang: The language implementation to use for the loading,
74-
/// which will be destroyed by this function.
75-
/// \return The symbol table that is generated by parsing this file.
58+
/// Returns the symbol table from \ref load_goto_model_from_java_class
7659
symbol_tablet load_java_class(
7760
const std::string &java_class_name,
7861
const std::string &class_path,
@@ -89,6 +72,20 @@ symbol_tablet load_java_class(
8972
->get_symbol_table();
9073
}
9174

75+
/// Go through the process of loading, type-checking and finalising a
76+
/// specific class file to build a goto model from it.
77+
/// \param java_class_name: The name of the class file to load. It should not
78+
/// include the .class extension.
79+
/// \param class_path: The path to load the class from. Should be relative to
80+
/// the unit directory.
81+
/// \param main: The name of the main function or "" to use the default
82+
/// behaviour to find a main function.
83+
/// \param java_lang: The language implementation to use for the loading,
84+
/// which will be destroyed by this function.
85+
/// \param command_line: The command line used to configure the provided
86+
/// language
87+
/// \return The goto model containing both the functions and the symbol table
88+
/// from loading this class.
9289
std::unique_ptr<goto_modelt> load_goto_model_from_java_class(
9390
const std::string &java_class_name,
9491
const std::string &class_path,
@@ -162,6 +159,9 @@ std::unique_ptr<goto_modelt> load_goto_model_from_java_class(
162159
return maybe_goto_model;
163160
}
164161

162+
/// Returns the symbol table from \ref load_goto_model_from_java_class
163+
/// with the command line set to be disabling lazy loading and string
164+
/// refinement
165165
symbol_tablet load_java_class(
166166
const std::string &java_class_name,
167167
const std::string &class_path,
@@ -180,6 +180,9 @@ symbol_tablet load_java_class(
180180
java_class_name, class_path, main, std::move(java_lang), command_line);
181181
}
182182

183+
/// See \ref load_goto_model_from_java_class
184+
/// With the command line configured to disable lazy loading and string
185+
/// refinement and the language set to be the default java_bytecode language
183186
std::unique_ptr<goto_modelt> load_goto_model_from_java_class(
184187
const std::string &java_class_name,
185188
const std::string &class_path,

0 commit comments

Comments
 (0)