7
7
\*******************************************************************/
8
8
9
9
#include " load_java_class.h"
10
+ #include " free_form_cmdline.h"
10
11
#include < testing-utils/catch.hpp>
11
12
#include < iostream>
12
13
13
14
#include < util/config.h>
14
- #include < util/options.h>
15
15
#include < util/suffix.h>
16
16
17
17
#include < goto-programs/lazy_goto_model.h>
@@ -51,7 +51,8 @@ symbol_tablet load_java_class(
51
51
const std::string &java_class_name,
52
52
const std::string &class_path,
53
53
const std::string &main,
54
- std::unique_ptr<languaget> &&java_lang)
54
+ std::unique_ptr<languaget> &&java_lang,
55
+ const cmdlinet &command_line)
55
56
{
56
57
// We expect the name of the class without the .class suffix to allow us to
57
58
// check it
@@ -66,8 +67,6 @@ symbol_tablet load_java_class(
66
67
message_handler);
67
68
68
69
// Configure the path loading
69
- cmdlinet command_line;
70
- command_line.set (" java-cp-include-files" , class_path);
71
70
config.java .classpath .clear ();
72
71
config.java .classpath .push_back (class_path);
73
72
config.main = main;
@@ -109,3 +108,18 @@ symbol_tablet load_java_class(
109
108
REQUIRE_FALSE (class_type.get_bool (ID_incomplete_class));
110
109
return std::move (maybe_goto_model->symbol_table );
111
110
}
111
+
112
+ symbol_tablet load_java_class (
113
+ const std::string &java_class_name,
114
+ const std::string &class_path,
115
+ const std::string &main,
116
+ std::unique_ptr<languaget> &&java_lang)
117
+ {
118
+ cmdlinet command_line;
119
+ // TODO(tkiley): This doesn't do anything as "java-cp-include-files" is an
120
+ // TODO(tkiley): unknown argument. This could be changed by using the
121
+ // TODO(tkiley): free_form_cmdlinet
122
+ command_line.set (" java-cp-include-files" , class_path);
123
+ return load_java_class (
124
+ java_class_name, class_path, main, std::move (java_lang), command_line);
125
+ }
0 commit comments