Skip to content

Commit 8bc84ad

Browse files
author
thk123
committed
Introduce method for getting the name of of java_class_type
1 parent a64c5bd commit 8bc84ad

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

jbmc/src/java_bytecode/java_types.h

+14
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ class java_class_typet:public class_typet
158158
return type_checked_cast<annotated_typet>(
159159
static_cast<typet &>(*this)).get_annotations();
160160
}
161+
162+
/// Get the name of the struct, which can be used to look up its symbol
163+
/// in the symbol table.
164+
irep_idt get_name() const
165+
{
166+
return get(ID_name);
167+
}
168+
169+
/// Set the name of the struct, which can be used to look up its symbol
170+
/// in the symbol table.
171+
void set_name(const irep_idt &name)
172+
{
173+
set(ID_name, name);
174+
}
161175
};
162176

163177
inline const java_class_typet &to_java_class_type(const typet &type)

0 commit comments

Comments
 (0)