@@ -118,7 +118,15 @@ class java_bytecode_convert_classt:public messaget
118
118
// see definition below for more info
119
119
static void add_array_types (symbol_tablet &symbol_table);
120
120
121
- static bool is_overlay_method (const methodt &method);
121
+ static bool is_overlay_method (const methodt &method)
122
+ {
123
+ return method.has_annotation (ID_overlay_method);
124
+ }
125
+
126
+ static bool is_ignored_method (const methodt &method)
127
+ {
128
+ return method.has_annotation (ID_ignored_method);
129
+ }
122
130
123
131
bool check_field_exists (
124
132
const fieldt &field,
@@ -393,7 +401,7 @@ void java_bytecode_convert_classt::convert(
393
401
new_symbol.base_name = base_name;
394
402
new_symbol.pretty_name =c.name ;
395
403
new_symbol.name =qualified_classname;
396
- class_type.set (ID_name, new_symbol.name );
404
+ class_type.set_name ( new_symbol.name );
397
405
new_symbol.type =class_type;
398
406
new_symbol.mode =ID_java;
399
407
new_symbol.is_type =true ;
@@ -455,6 +463,8 @@ void java_bytecode_convert_classt::convert(
455
463
{
456
464
for (const methodt &method : overlay_class.get ().methods )
457
465
{
466
+ if (is_ignored_method (method))
467
+ continue ;
458
468
const irep_idt method_identifier =
459
469
qualified_classname + " ." + id2string (method.name )
460
470
+ " :" + method.descriptor ;
@@ -496,6 +506,8 @@ void java_bytecode_convert_classt::convert(
496
506
}
497
507
for (const methodt &method : c.methods )
498
508
{
509
+ if (is_ignored_method (method))
510
+ continue ;
499
511
const irep_idt method_identifier=
500
512
qualified_classname + " ." + id2string (method.name )
501
513
+ " :" + method.descriptor ;
@@ -716,15 +728,15 @@ void java_bytecode_convert_classt::add_array_types(symbol_tablet &symbol_table)
716
728
if (symbol_table.has_symbol (symbol_type_identifier))
717
729
return ;
718
730
719
- class_typet class_type;
731
+ java_class_typet class_type;
720
732
// we have the base class, java.lang.Object, length and data
721
733
// of appropriate type
722
734
class_type.set_tag (symbol_type_identifier);
723
735
// Note that non-array types don't have "java::" at the beginning of their
724
736
// tag, and their name is "java::" + their tag. Since arrays do have
725
737
// "java::" at the beginning of their tag we set the name to be the same as
726
738
// the tag.
727
- class_type.set (ID_name, symbol_type_identifier);
739
+ class_type.set_name ( symbol_type_identifier);
728
740
729
741
class_type.components ().reserve (3 );
730
742
class_typet::componentt base_class_component (
@@ -877,13 +889,6 @@ void java_bytecode_convert_classt::add_array_types(symbol_tablet &symbol_table)
877
889
}
878
890
}
879
891
880
- bool java_bytecode_convert_classt::is_overlay_method (const methodt &method)
881
- {
882
- return java_bytecode_parse_treet::find_annotation (
883
- method.annotations , ID_overlay_method)
884
- .has_value ();
885
- }
886
-
887
892
bool java_bytecode_convert_class (
888
893
const java_class_loadert::parse_tree_with_overlayst &parse_trees,
889
894
symbol_tablet &symbol_table,
0 commit comments