File tree 5 files changed +24
-4
lines changed
5 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ void java_bytecode_convert_classt::convert(
268
268
class_type.set (ID_interface, c.is_interface );
269
269
class_type.set (ID_synthetic, c.is_synthetic );
270
270
class_type.set_final (c.is_final );
271
+ class_type.set_is_inner_class (c.is_inner_class );
271
272
if (c.is_enum )
272
273
{
273
274
if (max_array_length != 0 && c.enum_elements > max_array_length)
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ class java_bytecode_parse_treet
212
212
bool is_interface = false ;
213
213
bool is_synthetic = false ;
214
214
bool is_annotation = false ;
215
+ bool is_inner_class = false ;
215
216
bool attribute_bootstrapmethods_read = false ;
216
217
size_t enum_elements=0 ;
217
218
Original file line number Diff line number Diff line change @@ -1669,16 +1669,23 @@ void java_bytecode_parsert::rclass_attribute(classt &parsed_class)
1669
1669
std::string inner_class_info_name =
1670
1670
class_infot (pool_entry (inner_class_info_index))
1671
1671
.get_name (pool_entry_lambda);
1672
- UNUSED bool is_private = inner_class_access_flags & ACC_PRIVATE;
1673
- UNUSED bool is_public = inner_class_access_flags & ACC_PUBLIC;
1674
- UNUSED bool is_protected = inner_class_access_flags & ACC_PROTECTED;
1672
+ bool is_private = inner_class_access_flags & ACC_PRIVATE;
1673
+ bool is_public = inner_class_access_flags & ACC_PUBLIC;
1674
+ bool is_protected = inner_class_access_flags & ACC_PROTECTED;
1675
1675
1676
1676
// If the original parsed class name matches the inner class name
1677
1677
// the parsed class is an inner class, so overwrite the parsed class'
1678
1678
// access information and mark it as an inner class
1679
- UNUSED bool is_inner_class =
1679
+ bool is_inner_class =
1680
1680
remove_separator_char (id2string (parsed_class.name ), ' .' ) ==
1681
1681
remove_separator_char (inner_class_info_name, ' /' );
1682
+ if (is_inner_class)
1683
+ {
1684
+ parsed_class.is_inner_class = is_inner_class;
1685
+ parsed_class.is_private = is_private;
1686
+ parsed_class.is_protected = is_protected;
1687
+ parsed_class.is_public = is_public;
1688
+ }
1682
1689
}
1683
1690
}
1684
1691
}
Original file line number Diff line number Diff line change @@ -111,6 +111,16 @@ class java_class_typet:public class_typet
111
111
return set (ID_access, access );
112
112
}
113
113
114
+ const bool get_is_inner_class () const
115
+ {
116
+ return get_bool (ID_is_inner_class);
117
+ }
118
+
119
+ void set_is_inner_class (const bool &is_inner_class)
120
+ {
121
+ return set (ID_is_inner_class, is_inner_class);
122
+ }
123
+
114
124
bool get_final ()
115
125
{
116
126
return get_bool (ID_final);
Original file line number Diff line number Diff line change @@ -674,6 +674,7 @@ IREP_ID_ONE(interface)
674
674
IREP_ID_TWO(C_must_not_throw, #must_not_throw)
675
675
IREP_ID_ONE(always_inline)
676
676
IREP_ID_ONE(is_always_inline)
677
+ IREP_ID_ONE(is_inner_class)
677
678
678
679
// Projects depending on this code base that wish to extend the list of
679
680
// available ids should provide a file local_irep_ids.h in their source tree and
You can’t perform that action at this time.
0 commit comments