Skip to content

Commit 848b526

Browse files
author
Joel Allred
committed
Retrieve final qualifier for methods from bytecode
1 parent 51eed48 commit 848b526

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ void java_bytecode_convert_methodt::convert(
447447
// (function) type of the symbol
448448
java_method_typet method_type = to_java_method_type(method_symbol.type);
449449
method_type.set(ID_C_class, class_symbol.name);
450+
method_type.set_is_final(m.is_final);
450451
method_return_type = method_type.return_type();
451452
java_method_typet::parameterst &parameters = method_type.parameters();
452453

jbmc/src/java_bytecode/java_types.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,16 @@ class java_method_typet : public code_typet
278278
{
279279
add(ID_exceptions_thrown_list).get_sub().push_back(irept(exception));
280280
}
281+
282+
bool get_is_final() const
283+
{
284+
return get_bool(ID_final);
285+
}
286+
287+
void set_is_final(bool is_final)
288+
{
289+
set(ID_final, is_final);
290+
}
281291
};
282292

283293
template <>

0 commit comments

Comments
 (0)