Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java_bytecode/generate_java_generic_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ symbolt generate_java_generic_typet::operator()(

const java_specialized_generic_class_typet new_java_class{
generic_name,
class_definition.get_tag(),
class_definition,
replacement_components,
existing_generic_type.generic_type_arguments()};

Expand Down
3 changes: 2 additions & 1 deletion src/java_bytecode/java_string_library_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typet string_length_type()
void java_string_library_preprocesst::add_string_type(
const irep_idt &class_name, symbol_tablet &symbol_table)
{
class_typet string_type;
java_class_typet string_type;
string_type.set_tag(class_name);
string_type.components().resize(3);
string_type.components()[0].set_name("@java.lang.Object");
Expand All @@ -204,6 +204,7 @@ void java_string_library_preprocesst::add_string_type(
string_type.components()[2].set_name("data");
string_type.components()[2].set_pretty_name("data");
string_type.components()[2].type() = pointer_type(java_char_type());
string_type.set_access(ID_public);
string_type.add_base(symbol_typet("java::java.lang.Object"));
if(class_name!="java.lang.CharSequence")
{
Expand Down
8 changes: 5 additions & 3 deletions src/java_bytecode/java_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,22 @@ class java_specialized_generic_class_typet : public java_class_typet
/// parameters and name.
/// \param generic_name: The new name for the class
/// (like Generic<java::Float>)
/// \param tag: The name for the original class (like java::Generic)
/// \param originating_class: The name for the original class (like
/// java::Generic)
/// \param new_components: The specialised components
/// \return The newly constructed class.
java_specialized_generic_class_typet(
const irep_idt &generic_name,
const irep_idt &tag,
const java_class_typet &originating_class,
const struct_typet::componentst &new_components,
const generic_type_argumentst &specialised_parameters)
{
set(ID_C_specialized_generic_java_class, true);
set(ID_name, "java::" + id2string(generic_name));
set(ID_base_name, id2string(generic_name));
components() = new_components;
set_tag(tag);
set_tag(originating_class.get_tag());
set_access(originating_class.get_access());

generic_type_arguments() = specialised_parameters;
}
Expand Down