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 @@ -123,6 +123,17 @@ reference_typet java_array_type(const char subtype)
123123 return java_reference_type (symbol_type);
124124}
125125
126+ // / Return the type of the elements of a given java array type
127+ // / \param array_type The java array type
128+ // / \return The type of the elements of the array
129+ typet java_array_element_type (const symbol_typet &array_type)
130+ {
131+ INVARIANT (
132+ is_java_array_tag (array_type.get_identifier ()),
133+ " Symbol should have array tag" );
134+ return array_type.find_type (ID_C_element_type);
135+ }
136+
126137// / See above
127138// / \par parameters: Struct tag 'tag'
128139// / \return True if the given struct is a Java array
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ reference_typet java_lang_object_type();
5656symbol_typet java_classname (const std::string &);
5757
5858reference_typet java_array_type (const char subtype);
59+ typet java_array_element_type (const symbol_typet &array_type);
5960
6061bool is_reference_type (char t);
6162
You can’t perform that action at this time.
0 commit comments