File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,17 @@ static bool is_overlay_class(const java_bytecode_parse_treet::classt &c)
103
103
.has_value ();
104
104
}
105
105
106
+ bool java_class_loadert::can_load_class (const irep_idt &class_name)
107
+ {
108
+ for (const auto &cp_entry : classpath_entries)
109
+ {
110
+ auto parse_tree = load_class (class_name, cp_entry);
111
+ if (parse_tree.has_value ())
112
+ return true ;
113
+ }
114
+ return false ;
115
+ }
116
+
106
117
// / Check through all the places class parse trees can appear and returns the
107
118
// / first implementation it finds plus any overlay class implementations.
108
119
// / Uses \p class_loader_limit to limit the class files that it might (directly
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ class java_class_loadert : public java_class_loader_baset
43
43
44
44
parse_tree_with_overlayst &operator ()(const irep_idt &class_name);
45
45
46
+ // / Checks whether \p class_name is parseable from the classpath,
47
+ // / ignoring class loading limits.
48
+ bool can_load_class (const irep_idt &class_name);
49
+
46
50
parse_tree_with_overlayst &get_parse_tree (
47
51
java_class_loader_limitt &class_loader_limit,
48
52
const irep_idt &class_name);
You can’t perform that action at this time.
0 commit comments