Skip to content

Commit 41bb0d4

Browse files
author
thk123
committed
Store in the class_typet whether the class is abstract
For interfaces and abstract classes, store in the type a value to indicate if the class is abstract.
1 parent a3e7557 commit 41bb0d4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/java_bytecode/java_bytecode_convert_class.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ void java_bytecode_convert_classt::convert(const classt &c)
9393

9494
class_type.set_tag(c.name);
9595
class_type.set(ID_base_name, c.name);
96+
class_type.set(ID_abstract, c.is_abstract);
9697
if(c.is_enum)
9798
{
9899
class_type.set(

src/util/std_types.h

+5
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ class class_typet:public struct_typet
401401

402402
return false;
403403
}
404+
405+
bool is_abstract() const
406+
{
407+
return get_bool(ID_abstract);
408+
}
404409
};
405410

406411
/*! \brief Cast a generic typet to a \ref class_typet

0 commit comments

Comments
 (0)