File tree 5 files changed +15
-10
lines changed 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ entry_pointt::entry_pointt(
28
28
29
29
for (const code_typet::parametert ¶meter : signature_info.parameters ())
30
30
{
31
- method.parameters .emplace_back (utilst::fetch_type_name (parameter.type ()));
31
+ method.parameters .emplace_back (
32
+ utilst::get_java_type_name (parameter.type ()));
32
33
}
33
34
34
- method.return_type = utilst::fetch_type_name (signature_info.return_type ());
35
+ method.return_type = utilst::get_java_type_name (signature_info.return_type ());
35
36
36
37
std::string method_name;
37
38
method.name = id2string (entry_point_method.name );
Original file line number Diff line number Diff line change @@ -214,13 +214,13 @@ void entry_point_detectiont::find_entry_points(
214
214
signature_info.parameters ().end (),
215
215
std::back_inserter (parameter_types),
216
216
[](parsed_param param)
217
- { return utilst::fetch_type_name (param.type ()); });
217
+ { return utilst::get_java_type_name (param.type ()); });
218
218
219
219
if (!match_types (method_patterns.arguments , parameter_types))
220
220
continue ;
221
221
222
222
std::string return_type =
223
- utilst::fetch_type_name (signature_info.return_type ());
223
+ utilst::get_java_type_name (signature_info.return_type ());
224
224
if (!return_type.empty ())
225
225
{
226
226
std::vector<std::string> ret_vec = {return_type};
Original file line number Diff line number Diff line change 19
19
#include < util/parse_options.h>
20
20
#include < util/ui_message.h>
21
21
#include < utility>
22
+ #include < utils.h>
22
23
23
24
class cmdline_optionst final :
24
25
public parse_options_baset
@@ -300,11 +301,14 @@ int cmdline_optionst::doit()
300
301
for (const java_bytecode_parse_treet::fieldt &field :
301
302
parsed_class.fields )
302
303
{
304
+ typet field_type = java_type_from_string (
305
+ field.signature .has_value () ? field.signature .value ()
306
+ : field.descriptor ,
307
+ id2string (parsed_class.name ));
308
+
303
309
if (has_annotation_in_list (field.annotations , autowire_annotation))
304
310
bean.fields .emplace_back (
305
- field.name ,
306
- field.signature .has_value () ? field.signature .value ()
307
- : field.descriptor );
311
+ field.name , utilst::get_java_type_name (field_type));
308
312
}
309
313
310
314
beans.push_back (std::move (bean));
Original file line number Diff line number Diff line change 11
11
// / Reconstruct the type declaration to match normal Java code.
12
12
// / \param type: type to recursively reconstruct name from.
13
13
// / \return human-friendly type name
14
- std::string utilst::fetch_type_name (const typet &type)
14
+ std::string utilst::get_java_type_name (const typet &type)
15
15
{
16
16
if (type.id () == ID_pointer)
17
17
{
@@ -25,7 +25,7 @@ std::string utilst::fetch_type_name(const typet &type)
25
25
for (const reference_typet &type_arguments :
26
26
to_java_generic_type (type).generic_type_arguments ())
27
27
{
28
- type_argument_names.push_back (fetch_type_name (type_arguments));
28
+ type_argument_names.push_back (get_java_type_name (type_arguments));
29
29
}
30
30
31
31
if (!type_argument_names.empty ())
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ typedef code_typet::parametert parsed_param;
12
12
class utilst
13
13
{
14
14
public:
15
- static std::string fetch_type_name (const typet &type);
15
+ static std::string get_java_type_name (const typet &type);
16
16
};
17
17
18
18
#endif // SECURITY_SCANNER_UTILS_H
You can’t perform that action at this time.
0 commit comments