@@ -191,15 +191,15 @@ extract_generic_superclass_reference(const optionalt<std::string> &signature)
191
191
// skip the (potential) list of generic parameters at the beginning of the
192
192
// signature
193
193
const size_t start =
194
- signature. value (). front () == ' <'
195
- ? find_closing_delimiter (signature. value () , 0 , ' <' , ' >' ) + 1
194
+ signature-> front () == ' <'
195
+ ? find_closing_delimiter (* signature, 0 , ' <' , ' >' ) + 1
196
196
: 0 ;
197
197
198
198
// extract the superclass reference
199
199
const size_t end =
200
- find_closing_semi_colon_for_reference_type (signature. value () , start);
200
+ find_closing_semi_colon_for_reference_type (* signature, start);
201
201
const std::string superclass_ref =
202
- signature. value (). substr (start, (end - start) + 1 );
202
+ signature-> substr (start, (end - start) + 1 );
203
203
204
204
// if the superclass is generic then the reference is of form
205
205
// `Lsuperclass-name<generic-types;>;` if it is implicitly generic, then the
@@ -232,14 +232,14 @@ static optionalt<std::string> extract_generic_interface_reference(
232
232
// skip the (potential) list of generic parameters at the beginning of the
233
233
// signature
234
234
size_t start =
235
- signature. value (). front () == ' <'
236
- ? find_closing_delimiter (signature. value () , 0 , ' <' , ' >' ) + 1
235
+ signature-> front () == ' <'
236
+ ? find_closing_delimiter (* signature, 0 , ' <' , ' >' ) + 1
237
237
: 0 ;
238
238
239
239
// skip the superclass reference (if there is at least one interface
240
240
// reference in the signature, then there is a superclass reference)
241
241
start =
242
- find_closing_semi_colon_for_reference_type (signature. value () , start) + 1 ;
242
+ find_closing_semi_colon_for_reference_type (* signature, start) + 1 ;
243
243
244
244
// if the interface name includes package name, convert dots to slashes
245
245
std::string interface_name_slash_to_dot = interface_name;
@@ -250,12 +250,12 @@ static optionalt<std::string> extract_generic_interface_reference(
250
250
' /' );
251
251
252
252
start =
253
- signature. value (). find (" L" + interface_name_slash_to_dot + " <" , start);
253
+ signature-> find (" L" + interface_name_slash_to_dot + " <" , start);
254
254
if (start != std::string::npos)
255
255
{
256
256
const size_t &end =
257
- find_closing_semi_colon_for_reference_type (signature. value () , start);
258
- return signature. value (). substr (start, (end - start) + 1 );
257
+ find_closing_semi_colon_for_reference_type (* signature, start);
258
+ return signature-> substr (start, (end - start) + 1 );
259
259
}
260
260
}
261
261
return {};
@@ -277,20 +277,20 @@ void java_bytecode_convert_classt::convert(
277
277
}
278
278
279
279
java_class_typet class_type;
280
- if (c.signature .has_value () && c.signature . value ( )[0 ]==' <' )
280
+ if (c.signature .has_value () && (* c.signature )[0 ]==' <' )
281
281
{
282
282
java_generic_class_typet generic_class_type;
283
283
#ifdef DEBUG
284
284
std::cout << " INFO: found generic class signature "
285
- << c.signature . value ()
285
+ << * c.signature
286
286
<< " in parsed class "
287
287
<< c.name << " \n " ;
288
288
#endif
289
289
try
290
290
{
291
291
const std::vector<typet> &generic_types=java_generic_type_from_string (
292
292
id2string (c.name ),
293
- c.signature . value () );
293
+ * c.signature );
294
294
for (const typet &t : generic_types)
295
295
{
296
296
generic_class_type.generic_types ()
@@ -301,7 +301,7 @@ void java_bytecode_convert_classt::convert(
301
301
catch (const unsupported_java_class_signature_exceptiont &e)
302
302
{
303
303
log .debug () << " Class: " << c.name
304
- << " \n could not parse signature: " << c.signature . value ()
304
+ << " \n could not parse signature: " << * c.signature
305
305
<< " \n " << e.what ()
306
306
<< " \n ignoring that the class is generic" << messaget::eom;
307
307
}
@@ -359,15 +359,15 @@ void java_bytecode_convert_classt::convert(
359
359
try
360
360
{
361
361
const java_generic_struct_tag_typet generic_base (
362
- base, superclass_ref. value () , qualified_classname);
362
+ base, * superclass_ref, qualified_classname);
363
363
class_type.add_base (generic_base);
364
364
}
365
365
catch (const unsupported_java_class_signature_exceptiont &e)
366
366
{
367
367
log .debug () << " Superclass: " << c.super_class
368
368
<< " of class: " << c.name
369
369
<< " \n could not parse signature: "
370
- << superclass_ref. value () << " \n " << e.what ()
370
+ << * superclass_ref << " \n " << e.what ()
371
371
<< " \n ignoring that the superclass is generic"
372
372
<< messaget::eom;
373
373
class_type.add_base (base);
@@ -401,13 +401,13 @@ void java_bytecode_convert_classt::convert(
401
401
try
402
402
{
403
403
const java_generic_struct_tag_typet generic_base (
404
- base, interface_ref. value () , qualified_classname);
404
+ base, * interface_ref, qualified_classname);
405
405
class_type.add_base (generic_base);
406
406
}
407
407
catch (const unsupported_java_class_signature_exceptiont &e)
408
408
{
409
409
log .debug () << " Interface: " << interface << " of class: " << c.name
410
- << " \n could not parse signature: " << interface_ref. value ()
410
+ << " \n could not parse signature: " << * interface_ref
411
411
<< " \n " << e.what ()
412
412
<< " \n ignoring that the interface is generic"
413
413
<< messaget::eom;
0 commit comments