@@ -58,18 +58,8 @@ symbol_tablet load_java_class(
58
58
const std::string &class_path,
59
59
const std::string &main)
60
60
{
61
- free_form_cmdlinet command_line;
62
- command_line.add_flag (" no-lazy-methods" );
63
- command_line.add_flag (" no-refine-strings" );
64
-
65
- register_language (new_java_bytecode_language);
66
-
67
- return load_java_class (
68
- java_class_name,
69
- class_path,
70
- main,
71
- get_language_from_mode (ID_java),
72
- command_line);
61
+ return load_goto_model_from_java_class (java_class_name, class_path, main)
62
+ ->get_symbol_table ();
73
63
}
74
64
75
65
// / Go through the process of loading, type-checking and finalising loading a
@@ -89,6 +79,22 @@ symbol_tablet load_java_class(
89
79
const std::string &main,
90
80
std::unique_ptr<languaget> &&java_lang,
91
81
const cmdlinet &command_line)
82
+ {
83
+ return load_goto_model_from_java_class (
84
+ java_class_name,
85
+ class_path,
86
+ main,
87
+ std::move (java_lang),
88
+ command_line)
89
+ ->get_symbol_table ();
90
+ }
91
+
92
+ std::unique_ptr<goto_modelt> load_goto_model_from_java_class (
93
+ const std::string &java_class_name,
94
+ const std::string &class_path,
95
+ const std::string &main,
96
+ std::unique_ptr<languaget> &&java_lang,
97
+ const cmdlinet &command_line)
92
98
{
93
99
// We expect the name of the class without the .class suffix to allow us to
94
100
// check it
@@ -153,7 +159,7 @@ symbol_tablet load_java_class(
153
159
// Check your working directory and the class path is correctly configured
154
160
// as this often indicates that one of these is wrong.
155
161
REQUIRE_FALSE (class_type.get_bool (ID_incomplete_class));
156
- return std::move ( maybe_goto_model-> symbol_table ) ;
162
+ return maybe_goto_model;
157
163
}
158
164
159
165
symbol_tablet load_java_class (
@@ -173,3 +179,22 @@ symbol_tablet load_java_class(
173
179
return load_java_class (
174
180
java_class_name, class_path, main, std::move (java_lang), command_line);
175
181
}
182
+
183
+ std::unique_ptr<goto_modelt> load_goto_model_from_java_class (
184
+ const std::string &java_class_name,
185
+ const std::string &class_path,
186
+ const std::string &main)
187
+ {
188
+ free_form_cmdlinet command_line;
189
+ command_line.add_flag (" no-lazy-methods" );
190
+ command_line.add_flag (" no-refine-strings" );
191
+
192
+ register_language (new_java_bytecode_language);
193
+
194
+ return load_goto_model_from_java_class (
195
+ java_class_name,
196
+ class_path,
197
+ main,
198
+ get_language_from_mode (ID_java),
199
+ command_line);
200
+ }
0 commit comments