23 &generic_parameter_specialization_map,
33 &generic_parameter_specialization_map)
const
35 auto parameter = type_try_dynamic_cast<java_generic_parametert>(
pointer_type);
36 if(parameter !=
nullptr)
38 irep_idt parameter_name = parameter->get_name();
42 generic_parameter_specialization_map;
45 const std::optional<reference_typet> specialization =
46 spec_map_copy.
pop(parameter_name);
57 return *specialization;
67 const auto *array_element_type =
69 if(array_element_type ==
nullptr)
73 *array_element_type, generic_parameter_specialization_map);
76 replacement_array_type.
base_type().
set(ID_element_type, new_array_type);
77 return replacement_array_type;
83 std::set<struct_tag_typet>
pointer_typet pointer_type(const typet &subtype)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void pop(std::size_t container_index)
Pop the top of the specialization stack for a given container.
void set(const irep_idt &name, const irep_idt &value)
const irep_idt get_name() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
const typet & base_type() const
The type of the data what we point to.
virtual std::set< struct_tag_typet > get_parameter_alternative_types(const irep_idt &function_name, const irep_idt ¶meter_name, const namespacet &ns) const
Get alternative types for a method parameter, e.g., based on the casts in the function body.
pointer_typet specialize_generics(const pointer_typet &pointer_type, const generic_parameter_specialization_mapt &generic_parameter_specialization_map) const
Specialize generic parameters in a pointer type based on the current map of parameters -> types.
virtual pointer_typet convert_pointer_type(const pointer_typet &pointer_type, const generic_parameter_specialization_mapt &generic_parameter_specialization_map, const namespacet &ns) const
Select what type should be used for a given pointer type.
const typet & java_array_element_type(const struct_tag_typet &array_symbol)
Return a const reference to the element type of a given java array type.
java_reference_typet java_array_type(const char subtype)
Construct an array pointer type.
bool is_java_array_tag(const irep_idt &tag)
See above.
bool is_java_generic_parameter(const typet &type)
Checks whether the type is a java generic parameter/variable, e.g., T in List<T>.
const java_generic_parametert & to_java_generic_parameter(const typet &type)
Handle selection of correct pointer type (for example changing abstract classes to concrete versions)...