Skip to content

Commit a1ab7a6

Browse files
author
svorenova
committed
Improve documentation for java array types
1 parent b72b968 commit a1ab7a6

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

jbmc/src/java_bytecode/java_types.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ reference_typet java_lang_object_type()
8787
return java_reference_type(symbol_typet("java::java.lang.Object"));
8888
}
8989

90+
/// Construct an array pointer type. It is a pointer to a symbol with identifier
91+
/// java::array[]. Its ID_C_element_type is set to the corresponding primitive
92+
/// type, or void* for arrays of references.
93+
/// \param subtype Character indicating the type of array
9094
reference_typet java_array_type(const char subtype)
9195
{
9296
std::string subtype_str;
@@ -160,13 +164,24 @@ bool is_multidim_java_array_type(const typet &type)
160164
}
161165

162166
/// See above
163-
/// \par parameters: Struct tag 'tag'
164-
/// \return True if the given struct is a Java array
167+
/// \param tag Tag of a struct
168+
/// \return True if the given string is a Java array tag, i.e., has a prefix
169+
/// of java::array[
165170
bool is_java_array_tag(const irep_idt& tag)
166171
{
167172
return has_prefix(id2string(tag), "java::array[");
168173
}
169174

175+
/// Constructs a type indicated by the given character:
176+
/// - i integer
177+
/// - l long
178+
/// - s short
179+
/// - b byte
180+
/// - c character
181+
/// - f float
182+
/// - d double
183+
/// - z boolean
184+
/// - a reference
170185
typet java_type_from_char(char t)
171186
{
172187
switch(t)

jbmc/src/java_bytecode/java_types.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,6 @@ typet &java_array_element_type(symbol_typet &array_symbol);
250250
bool is_java_array_type(const typet &type);
251251
bool is_multidim_java_array_type(const typet &type);
252252

253-
// i integer
254-
// l long
255-
// s short
256-
// b byte
257-
// c character
258-
// f float
259-
// d double
260-
// z boolean
261-
// a reference
262-
263253
typet java_type_from_char(char t);
264254
typet java_type_from_string(
265255
const std::string &,

0 commit comments

Comments
 (0)