File tree 2 files changed +12
-0
lines changed
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)
123
123
return java_reference_type (symbol_type);
124
124
}
125
125
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
+
126
137
// / See above
127
138
// / \par parameters: Struct tag 'tag'
128
139
// / \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();
56
56
symbol_typet java_classname (const std::string &);
57
57
58
58
reference_typet java_array_type (const char subtype);
59
+ typet java_array_element_type (const symbol_typet &array_type);
59
60
60
61
bool is_reference_type (char t);
61
62
You can’t perform that action at this time.
0 commit comments