File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,17 @@ typet java_array_element_type(const symbol_typet &array_type)
131131 return array_type.find_type (ID_C_element_type);
132132}
133133
134+ // / Return a const reference to the element type of a given java array type
135+ // / \param array_type The java array type
136+ const typet &java_array_element_type_ref (const symbol_typet &array_type)
137+ {
138+ INVARIANT (
139+ is_java_array_tag (array_type.get_identifier ()),
140+ " Symbol should have array tag" );
141+ return array_type.find_type (ID_C_element_type);
142+ }
143+
144+
134145// / See above
135146// / \par parameters: Struct tag 'tag'
136147// / \return True if the given struct is a Java array
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ symbol_typet java_classname(const std::string &);
192192
193193reference_typet java_array_type (const char subtype);
194194typet java_array_element_type (const symbol_typet &array_type);
195+ const typet &java_array_element_type_ref (const symbol_typet &array_type);
195196
196197bool is_reference_type (char t);
197198
You can’t perform that action at this time.
0 commit comments