Skip to content

Commit 7310281

Browse files
author
thk123
committed
Tidying of java_specialized_generic_class_typet
Named the tag more intuitively (since it is not used as the tag). Added explicit on single parameter constructor.
1 parent 1667307 commit 7310281

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/java_bytecode/generate_java_generic_type.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
class generate_java_generic_typet
1818
{
1919
public:
20-
generate_java_generic_typet(
21-
message_handlert &message_handler);
20+
explicit generate_java_generic_typet(message_handlert &message_handler);
2221

2322
symbolt operator()(
2423
const java_generic_typet &existing_generic_type,

src/java_bytecode/java_types.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -444,18 +444,17 @@ class java_specialized_generic_class_typet : public java_class_typet
444444
public:
445445
/// Build the specialised version of the specific class, with the specified
446446
/// parameters and name.
447-
/// \param new_tag: The new name for the class (like Generic<java::Float>)
447+
/// \param generic_name: The new name for the class
448+
/// (like Generic<java::Float>)
448449
/// \param new_components: The specialised components
449450
/// \return The newly constructed class.
450451
java_specialized_generic_class_typet(
451-
const irep_idt &new_tag,
452+
const irep_idt &generic_name,
452453
const struct_typet::componentst &new_components)
453454
{
454455
set(ID_C_specialized_generic_java_class, true);
455-
// We are specialising the logic - so we don't want to be marked as generic
456-
set(ID_C_java_generics_class_type, false);
457-
set(ID_name, "java::" + id2string(new_tag));
458-
set(ID_base_name, id2string(new_tag));
456+
set(ID_name, "java::" + id2string(generic_name));
457+
set(ID_base_name, id2string(generic_name));
459458
components() = new_components;
460459
const std::string &class_tag = id2string(new_tag);
461460
set_tag(class_tag.substr(0, class_tag.find('<')));

0 commit comments

Comments
 (0)