CBMC
java_types.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_JAVA_BYTECODE_JAVA_TYPES_H
10 #define CPROVER_JAVA_BYTECODE_JAVA_TYPES_H
11 
12 #include <util/invariant.h>
13 #include <algorithm>
14 #include <set>
15 
16 #include <util/c_types.h>
17 #include <util/narrow.h>
18 #include <util/optional.h>
19 #include <util/std_expr.h>
20 
21 class java_annotationt : public irept
22 {
23 public:
24  class valuet : public irept
25  {
26  public:
27  valuet(irep_idt name, const exprt &value) : irept(name)
28  {
29  get_sub().push_back(value);
30  }
31 
32  const irep_idt &get_name() const
33  {
34  return id();
35  }
36 
37  const exprt &get_value() const
38  {
39  return static_cast<const exprt &>(get_sub().front());
40  }
41  };
42 
43  explicit java_annotationt(const typet &type)
44  {
45  set(ID_type, type);
46  }
47 
48  const typet &get_type() const
49  {
50  return static_cast<const typet &>(find(ID_type));
51  }
52 
53  const std::vector<valuet> &get_values() const
54  {
55  // This cast should be safe as valuet doesn't add data to irept
56  return reinterpret_cast<const std::vector<valuet> &>(get_sub());
57  }
58 
59  std::vector<valuet> &get_values()
60  {
61  // This cast should be safe as valuet doesn't add data to irept
62  return reinterpret_cast<std::vector<valuet> &>(get_sub());
63  }
64 };
65 
66 class annotated_typet : public typet
67 {
68 public:
69  const std::vector<java_annotationt> &get_annotations() const
70  {
71  // This cast should be safe as java_annotationt doesn't add data to irept
72  return reinterpret_cast<const std::vector<java_annotationt> &>(
73  find(ID_C_annotations).get_sub());
74  }
75 
76  std::vector<java_annotationt> &get_annotations()
77  {
78  // This cast should be safe as java_annotationt doesn't add data to irept
79  return reinterpret_cast<std::vector<java_annotationt> &>(
80  add(ID_C_annotations).get_sub());
81  }
82 };
83 
84 inline const annotated_typet &to_annotated_type(const typet &type)
85 {
86  return static_cast<const annotated_typet &>(type);
87 }
88 
90 {
91  return static_cast<annotated_typet &>(type);
92 }
93 
94 template <>
96 {
97  return true;
98 }
99 
101 {
102 public:
105 
109  java_method_typet(parameterst &&_parameters, typet &&_return_type)
110  : code_typet(std::move(_parameters), std::move(_return_type))
111  {
112  set(ID_C_java_method_type, true);
113  }
114 
118  java_method_typet(parameterst &&_parameters, const typet &_return_type)
119  : code_typet(std::move(_parameters), _return_type)
120  {
121  set(ID_C_java_method_type, true);
122  }
123 
124  const std::vector<irep_idt> throws_exceptions() const
125  {
126  std::vector<irep_idt> exceptions;
127  for(const auto &e : find(ID_exceptions_thrown_list).get_sub())
128  exceptions.push_back(e.id());
129  return exceptions;
130  }
131 
133  {
134  add(ID_exceptions_thrown_list).get_sub().push_back(irept(exception));
135  }
136 
137  bool get_is_final() const
138  {
139  return get_bool(ID_final);
140  }
141 
142  void set_is_final(bool is_final)
143  {
144  set(ID_final, is_final);
145  }
146 
147  bool get_native() const
148  {
149  return get_bool(ID_is_native_method);
150  }
151 
152  void set_native(bool is_native)
153  {
154  set(ID_is_native_method, is_native);
155  }
156 
157  bool get_is_varargs() const
158  {
159  return get_bool(ID_is_varargs_method);
160  }
161 
162  void set_is_varargs(bool is_varargs)
163  {
164  set(ID_is_varargs_method, is_varargs);
165  }
166 
167  bool is_synthetic() const
168  {
169  return get_bool(ID_synthetic);
170  }
171 
173  {
174  set(ID_synthetic, is_synthetic);
175  }
176 };
177 
178 template <>
179 inline bool can_cast_type<java_method_typet>(const typet &type)
180 {
181  return type.id() == ID_code && type.get_bool(ID_C_java_method_type);
182 }
183 
184 inline const java_method_typet &to_java_method_type(const typet &type)
185 {
187  return static_cast<const java_method_typet &>(type);
188 }
189 
191 {
193  return static_cast<java_method_typet &>(type);
194 }
195 
197 {
198 public:
199  class componentt : public class_typet::componentt
200  {
201  public:
202  componentt() = default;
203 
204  componentt(const irep_idt &_name, typet _type)
205  : class_typet::componentt(_name, std::move(_type))
206  {
207  }
208 
210  bool get_is_final() const
211  {
212  return get_bool(ID_final);
213  }
214 
216  void set_is_final(const bool is_final)
217  {
218  set(ID_final, is_final);
219  }
220  };
221 
222  using componentst = std::vector<componentt>;
223 
224  const componentst &components() const
225  {
226  return (const componentst &)(find(ID_components).get_sub());
227  }
228 
230  {
231  return (componentst &)(add(ID_components).get_sub());
232  }
233 
234  const componentt &get_component(const irep_idt &component_name) const
235  {
236  return static_cast<const componentt &>(
237  class_typet::get_component(component_name));
238  }
239 
241  {
242  public:
243  methodt() = delete;
244 
245  methodt(const irep_idt &_name, java_method_typet _type)
246  : class_typet::methodt(_name, std::move(_type))
247  {
248  }
249 
250  const java_method_typet &type() const
251  {
252  return static_cast<const java_method_typet &>(
254  }
255 
257  {
258  return static_cast<java_method_typet &>(class_typet::methodt::type());
259  }
260 
262  bool get_is_final() const
263  {
264  return get_bool(ID_final);
265  }
266 
268  void set_is_final(const bool is_final)
269  {
270  set(ID_final, is_final);
271  }
272 
274  bool get_is_native() const
275  {
276  return get_bool(ID_is_native_method);
277  }
278 
280  void set_is_native(const bool is_native)
281  {
282  set(ID_is_native_method, is_native);
283  }
284 
286  const irep_idt &get_descriptor() const
287  {
288  return get(ID_object_descriptor);
289  }
290 
292  void set_descriptor(const irep_idt &id)
293  {
294  set(ID_object_descriptor, id);
295  }
296  };
297 
298  using methodst = std::vector<methodt>;
299 
300  const methodst &methods() const
301  {
302  return (const methodst &)(find(ID_methods).get_sub());
303  }
304 
306  {
307  return (methodst &)(add(ID_methods).get_sub());
308  }
309 
311  using static_memberst = std::vector<componentt>;
312 
314  {
316  }
317 
319  {
321  }
322 
323  const irep_idt &get_access() const
324  {
325  return get(ID_access);
326  }
327 
328  void set_access(const irep_idt &access)
329  {
330  return set(ID_access, access);
331  }
332 
333  bool get_is_inner_class() const
334  {
335  return get_bool(ID_is_inner_class);
336  }
337 
338  void set_is_inner_class(const bool &is_inner_class)
339  {
340  return set(ID_is_inner_class, is_inner_class);
341  }
342 
343  const irep_idt &get_outer_class() const
344  {
345  return get(ID_outer_class);
346  }
347 
348  void set_outer_class(const irep_idt &outer_class)
349  {
350  return set(ID_outer_class, outer_class);
351  }
352 
353  const irep_idt &get_super_class() const
354  {
355  return get(ID_super_class);
356  }
357 
358  void set_super_class(const irep_idt &super_class)
359  {
360  return set(ID_super_class, super_class);
361  }
362 
363  bool get_is_static_class() const
364  {
365  return get_bool(ID_is_static);
366  }
367 
368  void set_is_static_class(const bool &is_static_class)
369  {
370  return set(ID_is_static, is_static_class);
371  }
372 
374  {
375  return get_bool(ID_is_anonymous);
376  }
377 
378  void set_is_anonymous_class(const bool &is_anonymous_class)
379  {
380  return set(ID_is_anonymous, is_anonymous_class);
381  }
382 
383  bool get_final() const
384  {
385  return get_bool(ID_final);
386  }
387 
388  void set_final(bool is_final)
389  {
390  set(ID_final, is_final);
391  }
392 
393  void set_is_stub(bool is_stub)
394  {
395  set(ID_incomplete_class, is_stub);
396  }
397 
398  bool get_is_stub() const
399  {
400  return get_bool(ID_incomplete_class);
401  }
402 
404  bool get_is_enumeration() const
405  {
406  return get_bool(ID_enumeration);
407  }
408 
410  void set_is_enumeration(const bool is_enumeration)
411  {
412  set(ID_enumeration, is_enumeration);
413  }
414 
416  bool get_abstract() const
417  {
418  return get_bool(ID_abstract);
419  }
420 
422  void set_abstract(bool abstract)
423  {
424  set(ID_abstract, abstract);
425  }
426 
428  bool get_synthetic() const
429  {
430  return get_bool(ID_synthetic);
431  }
432 
434  void set_synthetic(bool synthetic)
435  {
436  set(ID_synthetic, synthetic);
437  }
438 
440  bool get_is_annotation() const
441  {
442  return get_bool(ID_is_annotation);
443  }
444 
446  void set_is_annotation(bool is_annotation)
447  {
448  set(ID_is_annotation, is_annotation);
449  }
450 
452  bool get_interface() const
453  {
454  return get_bool(ID_interface);
455  }
456 
458  void set_interface(bool interface)
459  {
460  set(ID_interface, interface);
461  }
462 
465  {
474  };
475 
482  {
483  public:
485  const class_method_descriptor_exprt &method_descriptor,
486  method_handle_kindt handle_kind)
487  {
488  set(ID_object_descriptor, method_descriptor);
489  set(ID_handle_type, static_cast<int>(handle_kind));
490  }
491 
493  {
494  set(
495  ID_handle_type, static_cast<int>(method_handle_kindt::UNKNOWN_HANDLE));
496  }
497 
499  {
500  return static_cast<const class_method_descriptor_exprt &>(
501  find(ID_object_descriptor));
502  }
503 
505  {
507  }
508 
510  {
511  return (method_handle_kindt)get_int(ID_handle_type);
512  }
513  };
514 
515  using java_lambda_method_handlest = std::vector<java_lambda_method_handlet>;
516 
518  {
519  return (const java_lambda_method_handlest &)find(
520  ID_java_lambda_method_handles)
521  .get_sub();
522  }
523 
525  {
526  return (java_lambda_method_handlest &)add(ID_java_lambda_method_handles)
527  .get_sub();
528  }
529 
531  const class_method_descriptor_exprt &method_descriptor,
532  method_handle_kindt handle_kind)
533  {
534  // creates a symbol_exprt for the identifier and pushes it in the vector
535  lambda_method_handles().emplace_back(method_descriptor, handle_kind);
536  }
538  {
539  // creates empty symbol_exprt and pushes it in the vector
540  lambda_method_handles().emplace_back();
541  }
542 
543  const std::vector<java_annotationt> &get_annotations() const
544  {
545  return static_cast<const annotated_typet &>(
546  static_cast<const typet &>(*this)).get_annotations();
547  }
548 
549  std::vector<java_annotationt> &get_annotations()
550  {
551  return type_checked_cast<annotated_typet>(
552  static_cast<typet &>(*this)).get_annotations();
553  }
554 
557  const irep_idt &get_name() const
558  {
559  return get(ID_name);
560  }
561 
564  void set_name(const irep_idt &name)
565  {
566  set(ID_name, name);
567  }
568 
570  const irep_idt &get_inner_name() const
571  {
572  return get(ID_inner_name);
573  }
574 
576  void set_inner_name(const irep_idt &name)
577  {
578  set(ID_inner_name, name);
579  }
580 };
581 
582 inline const java_class_typet &to_java_class_type(const typet &type)
583 {
584  assert(type.id()==ID_struct);
585  return static_cast<const java_class_typet &>(type);
586 }
587 
589 {
590  assert(type.id()==ID_struct);
591  return static_cast<java_class_typet &>(type);
592 }
593 
594 template <>
595 inline bool can_cast_type<java_class_typet>(const typet &type)
596 {
597  return can_cast_type<class_typet>(type);
598 }
599 
603 {
604 public:
606  const struct_tag_typet &_subtype,
607  std::size_t _width)
608  : reference_typet(_subtype, _width)
609  {
610  }
611 
613  {
614  return static_cast<struct_tag_typet &>(reference_typet::subtype());
615  }
616 
617  const struct_tag_typet &subtype() const
618  {
619  return static_cast<const struct_tag_typet &>(reference_typet::subtype());
620  }
621 };
622 
623 template <>
625 {
626  return type.id() == ID_pointer &&
627  to_type_with_subtype(type).subtype().id() == ID_struct_tag;
628 }
629 
631 {
633  return static_cast<const java_reference_typet &>(type);
634 }
635 
637 {
639  return static_cast<java_reference_typet &>(type);
640 }
641 
654 struct_tag_typet java_classname(const std::string &);
655 
656 #define JAVA_REFERENCE_ARRAY_CLASSID "java::array[reference]"
657 
658 java_reference_typet java_array_type(const char subtype);
660 java_reference_array_type(const struct_tag_typet &element_type);
661 const typet &java_array_element_type(const struct_tag_typet &array_symbol);
663 bool is_java_array_type(const typet &type);
664 bool is_multidim_java_array_type(const typet &type);
665 
666 std::pair<typet, std::size_t>
668 
669 #define JAVA_ARRAY_DIMENSION_FIELD_NAME "@array_dimensions"
670 exprt get_array_dimension_field(const exprt &pointer);
671 #define JAVA_ARRAY_ELEMENT_CLASSID_FIELD_NAME "@element_class_identifier"
673 
674 typet java_type_from_char(char t);
676  const std::string &,
677  const std::string &class_name_prefix = "");
678 char java_char_from_type(const typet &type);
679 std::vector<typet> java_generic_type_from_string(
680  const std::string &,
681  const std::string &);
682 
686  const std::string src,
687  size_t starting_point = 0);
688 
689 std::vector<std::string> parse_raw_list_types(
690  std::string src,
691  char opening_bracket,
692  char closing_bracket);
693 
694 bool is_java_array_tag(const irep_idt &tag);
695 bool is_valid_java_array(const struct_typet &);
696 
697 bool equal_java_types(const typet &type1, const typet &type2);
698 
703 {
704 public:
706 
708  const irep_idt &_type_var_name,
709  const struct_tag_typet &_bound)
710  : struct_tag_typet(_bound)
711  {
712  set(ID_C_java_generic_parameter, true);
713  type_variables().push_back(struct_tag_typet(_type_var_name));
714  }
715 
718  {
719  PRECONDITION(!type_variables().empty());
720  return type_variables().front();
721  }
722 
724  {
725  PRECONDITION(!type_variables().empty());
726  return type_variables().front();
727  }
728 
729  const irep_idt get_name() const
730  {
731  return type_variable().get_identifier();
732  }
733 
734 private:
735  typedef std::vector<type_variablet> type_variablest;
737  {
738  return (const type_variablest &)(find(ID_type_variables).get_sub());
739  }
740 
742  {
743  return (type_variablest &)(add(ID_type_variables).get_sub());
744  }
745 };
746 
751 inline bool is_java_generic_parameter_tag(const typet &type)
752 {
753  return type.get_bool(ID_C_java_generic_parameter);
754 }
755 
758 inline const java_generic_parameter_tagt &
760 {
762  return static_cast<const java_generic_parameter_tagt &>(type);
763 }
764 
768 {
770  return static_cast<java_generic_parameter_tagt &>(type);
771 }
772 
776 {
777 public:
779 
781  const irep_idt &_type_var_name,
782  const struct_tag_typet &_bound)
784  java_generic_parameter_tagt(_type_var_name, _bound)))
785  {
786  }
787 
790  {
792  }
793 
795  {
797  }
798 
799  const irep_idt get_name() const
800  {
802  }
803 };
804 
809 template <>
811 {
812  return is_reference(base) &&
814 }
815 
820 inline bool is_java_generic_parameter(const typet &type)
821 {
823 }
824 
828  const typet &type)
829 {
831  return static_cast<const java_generic_parametert &>(type);
832 }
833 
837 {
839  return static_cast<java_generic_parametert &>(type);
840 }
841 
858 {
859 public:
860  typedef std::vector<reference_typet> generic_typest;
861 
863  : struct_tag_typet(type)
864  {
865  set(ID_C_java_generic_symbol, true);
866  }
867 
869  const struct_tag_typet &type,
870  const std::string &base_ref,
871  const std::string &class_name_prefix);
872 
874  {
875  return (const generic_typest &)(find(ID_generic_types).get_sub());
876  }
877 
879  {
880  return (generic_typest &)(add(ID_generic_types).get_sub());
881  }
882 
884  generic_type_index(const java_generic_parametert &type) const;
885 };
886 
889 inline bool is_java_generic_struct_tag_type(const typet &type)
890 {
891  return type.get_bool(ID_C_java_generic_symbol);
892 }
893 
896 inline const java_generic_struct_tag_typet &
898 {
900  return static_cast<const java_generic_struct_tag_typet &>(type);
901 }
902 
907 {
909  return static_cast<java_generic_struct_tag_typet &>(type);
910 }
911 
915 {
916 public:
918 
919  explicit java_generic_typet(const typet &_type)
922  {
923  }
924 
927  {
929  }
930 
933  {
935  }
936 };
937 
938 template <>
939 inline bool can_cast_type<java_generic_typet>(const typet &type)
940 {
941  return is_reference(type) &&
943 }
944 
947 inline bool is_java_generic_type(const typet &type)
948 {
950 }
951 
955  const typet &type)
956 {
958  return static_cast<const java_generic_typet &>(type);
959 }
960 
964 {
966  return static_cast<java_generic_typet &>(type);
967 }
968 
973 {
974  public:
975  typedef std::vector<java_generic_parametert> generic_typest;
976 
978  {
979  set(ID_C_java_generics_class_type, true);
980  }
981 
983  {
984  return (const generic_typest &)(find(ID_generic_types).get_sub());
985  }
986 
988  {
989  return (generic_typest &)(add(ID_generic_types).get_sub());
990  }
991 };
992 
995 inline bool is_java_generic_class_type(const typet &type)
996 {
997  return type.get_bool(ID_C_java_generics_class_type);
998 }
999 
1002 inline const java_generic_class_typet &
1004 {
1006  return static_cast<const java_generic_class_typet &>(type);
1007 }
1008 
1011 inline java_generic_class_typet &
1013 {
1015  return static_cast<java_generic_class_typet &>(type);
1016 }
1017 
1023  size_t index,
1024  const java_generic_typet &type)
1025 {
1026  const std::vector<reference_typet> &type_arguments =
1027  type.generic_type_arguments();
1028  PRECONDITION(index<type_arguments.size());
1029  return type_arguments[index];
1030 }
1031 
1036 inline const irep_idt &
1038 {
1039  const std::vector<java_generic_parametert> &gen_types=type.generic_types();
1040 
1041  PRECONDITION(index<gen_types.size());
1042  const java_generic_parametert &gen_type=gen_types[index];
1043 
1044  return gen_type.type_variable().get_identifier();
1045 }
1046 
1051 inline const typet &java_generic_class_type_bound(size_t index, const typet &t)
1052 {
1054  const java_generic_class_typet &type =
1056  const std::vector<java_generic_parametert> &gen_types=type.generic_types();
1057 
1058  PRECONDITION(index<gen_types.size());
1059  const java_generic_parametert &gen_type=gen_types[index];
1060 
1061  return gen_type.base_type();
1062 }
1063 
1068 {
1069 public:
1070  typedef std::vector<java_generic_parametert> implicit_generic_typest;
1071 
1073  const java_class_typet &class_type,
1074  const implicit_generic_typest &generic_types)
1075  : java_class_typet(class_type)
1076  {
1077  set(ID_C_java_implicitly_generic_class_type, true);
1078  for(const auto &type : generic_types)
1079  {
1080  implicit_generic_types().push_back(type);
1081  }
1082  }
1083 
1085  {
1086  return (
1088  &)(find(ID_implicit_generic_types).get_sub());
1089  }
1090 
1092  {
1093  return (
1094  implicit_generic_typest &)(add(ID_implicit_generic_types).get_sub());
1095  }
1096 };
1097 
1101 {
1102  return type.get_bool(ID_C_java_implicitly_generic_class_type);
1103 }
1104 
1109 {
1111  return static_cast<const java_implicitly_generic_class_typet &>(type);
1112 }
1113 
1118 {
1120  return static_cast<java_implicitly_generic_class_typet &>(type);
1121 }
1122 
1126 std::vector<java_generic_parametert>
1127 get_all_generic_parameters(const typet &type);
1128 
1131 class unsupported_java_class_signature_exceptiont:public std::logic_error
1132 {
1133 public:
1135  std::logic_error(
1136  "Unsupported class signature: "+type)
1137  {
1138  }
1139 };
1140 
1142  const std::string &descriptor,
1143  const optionalt<std::string> &signature,
1144  const std::string &class_name)
1145 {
1146  try
1147  {
1148  return java_type_from_string(signature.value(), class_name);
1149  }
1151  {
1152  return java_type_from_string(descriptor, class_name);
1153  }
1154 }
1155 
1161  const std::vector<java_generic_parametert> &gen_types,
1162  const irep_idt &identifier)
1163 {
1164  const auto iter = std::find_if(
1165  gen_types.cbegin(),
1166  gen_types.cend(),
1167  [&identifier](const java_generic_parametert &ref)
1168  {
1169  return ref.type_variable().get_identifier() == identifier;
1170  });
1171 
1172  if(iter == gen_types.cend())
1173  {
1174  return {};
1175  }
1176 
1177  return narrow_cast<size_t>(std::distance(gen_types.cbegin(), iter));
1178 }
1179 
1181  const std::string &,
1182  std::set<irep_idt> &);
1184  const typet &,
1185  std::set<irep_idt> &);
1186 
1191 std::string erase_type_arguments(const std::string &);
1197 std::string gather_full_class_name(const std::string &);
1198 
1199 // turn java type into string
1200 std::string pretty_java_type(const typet &);
1201 
1202 // pretty signature for methods
1203 std::string pretty_signature(const java_method_typet &);
1204 
1205 #endif // CPROVER_JAVA_BYTECODE_JAVA_TYPES_H
tag_typet::get_identifier
const irep_idt & get_identifier() const
Definition: std_types.h:410
is_java_generic_class_type
bool is_java_generic_class_type(const typet &type)
Definition: java_types.h:995
dstringt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:36
can_cast_type< java_reference_typet >
bool can_cast_type< java_reference_typet >(const typet &type)
Definition: java_types.h:624
java_generic_typet::java_generic_typet
java_generic_typet(const typet &_type)
Definition: java_types.h:919
struct_tag_typet::struct_tag_typet
struct_tag_typet(const irep_idt &identifier)
Definition: std_types.h:451
java_method_typet::add_throws_exception
void add_throws_exception(irep_idt exception)
Definition: java_types.h:132
java_class_typet::componentt
Definition: java_types.h:199
class_typet::methodst
componentst methodst
Definition: std_types.h:333
typet::subtype
const typet & subtype() const
Definition: type.h:50
java_class_typet::get_inner_name
const irep_idt & get_inner_name() const
Get the name of a java inner class.
Definition: java_types.h:570
class_typet
Class type.
Definition: std_types.h:324
java_double_type
floatbv_typet java_double_type()
Definition: java_types.cpp:73
java_generic_typet
Reference that points to a java_generic_struct_tag_typet.
Definition: java_types.h:914
java_class_typet::method_handle_kindt::LAMBDA_VIRTUAL_METHOD_HANDLE
@ LAMBDA_VIRTUAL_METHOD_HANDLE
Virtual call to the given interface or method.
struct_union_typet::get_component
const componentt & get_component(const irep_idt &component_name) const
Get the reference to a component with given name.
Definition: std_types.cpp:63
java_method_typet::get_is_final
bool get_is_final() const
Definition: java_types.h:137
java_class_typet::set_synthetic
void set_synthetic(bool synthetic)
marks class synthetic
Definition: java_types.h:434
java_class_typet::java_lambda_method_handlet::java_lambda_method_handlet
java_lambda_method_handlet()
Definition: java_types.h:492
java_byte_type
signedbv_typet java_byte_type()
Definition: java_types.cpp:55
java_class_typet::set_is_static_class
void set_is_static_class(const bool &is_static_class)
Definition: java_types.h:368
java_class_typet::set_is_anonymous_class
void set_is_anonymous_class(const bool &is_anonymous_class)
Definition: java_types.h:378
can_cast_type< annotated_typet >
bool can_cast_type< annotated_typet >(const typet &)
Definition: java_types.h:95
reference_typet
The reference type.
Definition: pointer_expr.h:106
java_class_typet::get_interface
bool get_interface() const
is class an interface?
Definition: java_types.h:452
java_implicitly_generic_class_typet::implicit_generic_types
const implicit_generic_typest & implicit_generic_types() const
Definition: java_types.h:1084
java_generic_class_typet::generic_typest
std::vector< java_generic_parametert > generic_typest
Definition: java_types.h:975
typet
The type of an expression, extends irept.
Definition: type.h:28
code_typet::parameterst
std::vector< parametert > parameterst
Definition: std_types.h:541
java_class_typet::method_handle_kindt::LAMBDA_STATIC_METHOD_HANDLE
@ LAMBDA_STATIC_METHOD_HANDLE
Direct call to the given method.
irept::find
const irept & find(const irep_idt &name) const
Definition: irep.cpp:106
optional.h
java_annotationt::valuet::get_name
const irep_idt & get_name() const
Definition: java_types.h:32
java_class_typet::get_is_enumeration
bool get_is_enumeration() const
is class an enumeration?
Definition: java_types.h:404
java_class_typet::get_component
const componentt & get_component(const irep_idt &component_name) const
Definition: java_types.h:234
unsupported_java_class_signature_exceptiont
An exception that is raised for unsupported class signature.
Definition: java_types.h:1131
java_class_typet::methodt::get_is_native
bool get_is_native() const
is a method 'native'?
Definition: java_types.h:274
java_int_type
signedbv_typet java_int_type()
Definition: java_types.cpp:31
java_class_typet::methodt::methodt
methodt(const irep_idt &_name, java_method_typet _type)
Definition: java_types.h:245
java_long_type
signedbv_typet java_long_type()
Definition: java_types.cpp:43
java_class_typet::add_unknown_lambda_method_handle
void add_unknown_lambda_method_handle()
Definition: java_types.h:537
java_method_typet::is_synthetic
bool is_synthetic() const
Definition: java_types.h:167
floatbv_typet
Fixed-width bit-vector with IEEE floating-point interpretation.
Definition: bitvector_types.h:321
to_annotated_type
const annotated_typet & to_annotated_type(const typet &type)
Definition: java_types.h:84
is_multidim_java_array_type
bool is_multidim_java_array_type(const typet &type)
Checks whether the given type is a multi-dimensional array pointer type, i.e., a pointer to an array ...
Definition: java_types.cpp:179
is_java_array_tag
bool is_java_array_tag(const irep_idt &tag)
See above.
Definition: java_types.cpp:233
annotated_typet::get_annotations
std::vector< java_annotationt > & get_annotations()
Definition: java_types.h:76
java_method_typet::get_native
bool get_native() const
Definition: java_types.h:147
java_class_typet::methodt
Definition: java_types.h:240
java_class_typet::methodt::type
java_method_typet & type()
Definition: java_types.h:256
java_generic_parametert
Reference that points to a java_generic_parameter_tagt.
Definition: java_types.h:775
java_class_typet::add_lambda_method_handle
void add_lambda_method_handle(const class_method_descriptor_exprt &method_descriptor, method_handle_kindt handle_kind)
Definition: java_types.h:530
invariant.h
to_type_with_subtype
const type_with_subtypet & to_type_with_subtype(const typet &type)
Definition: type.h:193
exprt
Base class for all expressions.
Definition: expr.h:55
struct_union_typet::componentst
std::vector< componentt > componentst
Definition: std_types.h:140
struct_tag_typet
A struct tag type, i.e., struct_typet with an identifier.
Definition: std_types.h:448
java_array_element_type
const typet & java_array_element_type(const struct_tag_typet &array_symbol)
Return a const reference to the element type of a given java array type.
Definition: java_types.cpp:144
java_class_typet::set_is_annotation
void set_is_annotation(bool is_annotation)
marks class an annotation
Definition: java_types.h:446
can_cast_type< java_generic_typet >
bool can_cast_type< java_generic_typet >(const typet &type)
Definition: java_types.h:939
is_java_implicitly_generic_class_type
bool is_java_implicitly_generic_class_type(const typet &type)
Definition: java_types.h:1100
java_class_typet::static_members
const static_memberst & static_members() const
Definition: java_types.h:313
java_generic_parametert::type_variablet
struct_tag_typet type_variablet
Definition: java_types.h:778
to_java_generic_class_type
const java_generic_class_typet & to_java_generic_class_type(const java_class_typet &type)
Definition: java_types.h:1003
pretty_java_type
std::string pretty_java_type(const typet &)
Definition: java_types.cpp:1089
java_generic_class_typet::generic_types
generic_typest & generic_types()
Definition: java_types.h:987
gather_full_class_name
std::string gather_full_class_name(const std::string &)
Returns the full class name, skipping over the generics.
Definition: java_types.cpp:365
java_class_typet::methods
const methodst & methods() const
Definition: java_types.h:300
java_method_typet::set_is_varargs
void set_is_varargs(bool is_varargs)
Definition: java_types.h:162
java_generic_typet::generic_type_argumentst
java_generic_struct_tag_typet::generic_typest generic_type_argumentst
Definition: java_types.h:917
is_java_array_type
bool is_java_array_type(const typet &type)
Checks whether the given type is an array pointer type.
Definition: java_types.cpp:163
java_generic_struct_tag_typet::generic_type_index
optionalt< size_t > generic_type_index(const java_generic_parametert &type) const
Check if this symbol has the given generic type.
Definition: java_types.cpp:1075
java_annotationt::valuet::valuet
valuet(irep_idt name, const exprt &value)
Definition: java_types.h:27
java_generic_struct_tag_typet::generic_types
const generic_typest & generic_types() const
Definition: java_types.h:873
java_generic_class_typet::java_generic_class_typet
java_generic_class_typet()
Definition: java_types.h:977
java_array_dimension_and_element_type
std::pair< typet, std::size_t > java_array_dimension_and_element_type(const struct_tag_typet &type)
Returns the underlying element type and array dimensionality of Java struct type.
Definition: java_types.cpp:189
java_class_typet::get_is_inner_class
bool get_is_inner_class() const
Definition: java_types.h:333
irept::irept
irept()=default
pretty_signature
std::string pretty_signature(const java_method_typet &)
Definition: java_types.cpp:1131
unsignedbv_typet
Fixed-width bit-vector with unsigned binary interpretation.
Definition: bitvector_types.h:158
java_generic_parametert::type_variable_ref
type_variablet & type_variable_ref()
Definition: java_types.h:794
java_class_typet::set_inner_name
void set_inner_name(const irep_idt &name)
Set the name of a java inner class.
Definition: java_types.h:576
irept::get
const irep_idt & get(const irep_idt &name) const
Definition: irep.cpp:45
java_class_typet
Definition: java_types.h:196
java_generic_class_typet::generic_types
const generic_typest & generic_types() const
Definition: java_types.h:982
get_array_dimension_field
exprt get_array_dimension_field(const exprt &pointer)
Definition: java_types.cpp:206
narrow.h
class_method_descriptor_exprt
An expression describing a method on a class.
Definition: std_expr.h:3440
java_type_from_string
optionalt< typet > java_type_from_string(const std::string &, const std::string &class_name_prefix="")
Transforms a string representation of a Java type into an internal type representation thereof.
Definition: java_types.cpp:561
java_class_typet::java_lambda_method_handlet
Represents a lambda call to a method.
Definition: java_types.h:481
java_type_from_string_with_exception
optionalt< typet > java_type_from_string_with_exception(const std::string &descriptor, const optionalt< std::string > &signature, const std::string &class_name)
Definition: java_types.h:1141
java_generic_get_inst_type
const typet & java_generic_get_inst_type(size_t index, const java_generic_typet &type)
Access information of type arguments of java instantiated type.
Definition: java_types.h:1022
c_bool_typet
The C/C++ Booleans.
Definition: c_types.h:74
java_array_type
java_reference_typet java_array_type(const char subtype)
Construct an array pointer type.
Definition: java_types.cpp:109
java_generic_parameter_tagt::java_generic_parameter_tagt
java_generic_parameter_tagt(const irep_idt &_type_var_name, const struct_tag_typet &_bound)
Definition: java_types.h:707
class_method_descriptor_exprt::get_identifier
const irep_idt & get_identifier() const
A unique identifier of the combination of class and method overload to which this expression refers.
Definition: std_expr.h:3501
java_class_typet::set_is_enumeration
void set_is_enumeration(const bool is_enumeration)
marks class as an enumeration
Definition: java_types.h:410
exprt::type
typet & type()
Return the type of the expression.
Definition: expr.h:84
java_class_typet::get_is_anonymous_class
bool get_is_anonymous_class() const
Definition: java_types.h:373
java_class_typet::methodt::type
const java_method_typet & type() const
Definition: java_types.h:250
java_annotationt::get_values
const std::vector< valuet > & get_values() const
Definition: java_types.h:53
java_method_typet::set_native
void set_native(bool is_native)
Definition: java_types.h:152
java_generic_parametert::get_name
const irep_idt get_name() const
Definition: java_types.h:799
java_annotationt::java_annotationt
java_annotationt(const typet &type)
Definition: java_types.h:43
java_class_typet::get_annotations
const std::vector< java_annotationt > & get_annotations() const
Definition: java_types.h:543
java_reference_typet::subtype
struct_tag_typet & subtype()
Definition: java_types.h:612
class_typet::static_memberst
componentst static_memberst
Definition: std_types.h:346
java_generic_struct_tag_typet::java_generic_struct_tag_typet
java_generic_struct_tag_typet(const struct_tag_typet &type)
Definition: java_types.h:862
empty_typet
The empty type.
Definition: std_types.h:50
java_annotationt::valuet
Definition: java_types.h:24
java_class_typet::get_is_annotation
bool get_is_annotation() const
is class an annotation?
Definition: java_types.h:440
to_java_generic_struct_tag_type
const java_generic_struct_tag_typet & to_java_generic_struct_tag_type(const typet &type)
Definition: java_types.h:897
java_generic_typet::generic_type_arguments
const generic_type_argumentst & generic_type_arguments() const
Definition: java_types.h:926
java_void_type
empty_typet java_void_type()
Definition: java_types.cpp:37
java_class_typet::methods
methodst & methods()
Definition: java_types.h:305
java_generic_parameter_tagt::type_variables
type_variablest & type_variables()
Definition: java_types.h:741
java_class_typet::java_lambda_method_handlest
std::vector< java_lambda_method_handlet > java_lambda_method_handlest
Definition: java_types.h:515
get_all_generic_parameters
std::vector< java_generic_parametert > get_all_generic_parameters(const typet &type)
Definition: java_types.cpp:924
irept::set
void set(const irep_idt &name, const irep_idt &value)
Definition: irep.h:420
java_class_typet::methodt::methodt
methodt()=delete
java_class_typet::methodt::set_is_final
void set_is_final(const bool is_final)
is a method 'final'?
Definition: java_types.h:268
PRECONDITION
#define PRECONDITION(CONDITION)
Definition: invariant.h:463
is_java_generic_parameter
bool is_java_generic_parameter(const typet &type)
Checks whether the type is a java generic parameter/variable, e.g., T in List<T>.
Definition: java_types.h:820
java_generic_parametert::java_generic_parametert
java_generic_parametert(const irep_idt &_type_var_name, const struct_tag_typet &_bound)
Definition: java_types.h:780
signedbv_typet
Fixed-width bit-vector with two's complement interpretation.
Definition: bitvector_types.h:207
to_java_reference_type
const java_reference_typet & to_java_reference_type(const typet &type)
Definition: java_types.h:630
is_java_generic_struct_tag_type
bool is_java_generic_struct_tag_type(const typet &type)
Definition: java_types.h:889
equal_java_types
bool equal_java_types(const typet &type1, const typet &type2)
Compares the types, including checking element types if both types are arrays.
Definition: java_types.cpp:895
annotated_typet
Definition: java_types.h:66
is_java_generic_type
bool is_java_generic_type(const typet &type)
Definition: java_types.h:947
class_typet::static_members
const static_memberst & static_members() const
Definition: std_types.h:348
java_implicitly_generic_class_typet
Type to hold a Java class that is implicitly generic, e.g., an inner class of a generic outer class o...
Definition: java_types.h:1067
java_implicitly_generic_class_typet::implicit_generic_types
implicit_generic_typest & implicit_generic_types()
Definition: java_types.h:1091
java_class_typet::method_handle_kindt::LAMBDA_CONSTRUCTOR_HANDLE
@ LAMBDA_CONSTRUCTOR_HANDLE
Instantiate the needed type then call a constructor.
java_generic_typet::generic_type_arguments
generic_type_argumentst & generic_type_arguments()
Definition: java_types.h:932
java_class_typet::methodt::set_is_native
void set_is_native(const bool is_native)
marks a method as 'native'
Definition: java_types.h:280
to_reference_type
const reference_typet & to_reference_type(const typet &type)
Cast a typet to a reference_typet.
Definition: pointer_expr.h:148
java_class_typet::java_lambda_method_handlet::get_lambda_method_identifier
const irep_idt & get_lambda_method_identifier() const
Definition: java_types.h:504
code_typet
Base type of functions.
Definition: std_types.h:538
java_generic_parameter_tagt::type_variables
const type_variablest & type_variables() const
Definition: java_types.h:736
java_method_typet::java_method_typet
java_method_typet(parameterst &&_parameters, typet &&_return_type)
Constructs a new code type, i.e.
Definition: java_types.h:109
java_class_typet::get_synthetic
bool get_synthetic() const
is class synthetic?
Definition: java_types.h:428
irept::id
const irep_idt & id() const
Definition: irep.h:396
java_class_typet::method_handle_kindt::UNKNOWN_HANDLE
@ UNKNOWN_HANDLE
Can't be called.
can_cast_type< java_class_typet >
bool can_cast_type< java_class_typet >(const typet &type)
Definition: java_types.h:595
to_struct_tag_type
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
Definition: std_types.h:474
java_class_typet::components
componentst & components()
Definition: java_types.h:229
java_class_typet::java_lambda_method_handlet::get_handle_kind
method_handle_kindt get_handle_kind() const
Definition: java_types.h:509
java_short_type
signedbv_typet java_short_type()
Definition: java_types.cpp:49
can_cast_type< java_generic_parametert >
bool can_cast_type< java_generic_parametert >(const typet &base)
Check whether a reference to a typet is a Java generic parameter/variable, e.g., T in List<T>.
Definition: java_types.h:810
java_generic_parameter_tagt
Class to hold a Java generic type parameter (also called type variable), e.g., T in List<T>.
Definition: java_types.h:702
get_array_element_type_field
exprt get_array_element_type_field(const exprt &pointer)
Definition: java_types.cpp:218
java_annotationt::get_type
const typet & get_type() const
Definition: java_types.h:48
java_class_typet::get_abstract
bool get_abstract() const
is class abstract?
Definition: java_types.h:416
java_class_typet::get_final
bool get_final() const
Definition: java_types.h:383
class_typet::methodt
componentt methodt
Definition: std_types.h:332
java_type_from_char
typet java_type_from_char(char t)
Constructs a type indicated by the given character:
Definition: java_types.cpp:248
to_java_generic_type
const java_generic_typet & to_java_generic_type(const typet &type)
Definition: java_types.h:954
optionalt
nonstd::optional< T > optionalt
Definition: optional.h:35
java_generic_parameter_tagt::type_variable_ref
type_variablet & type_variable_ref()
Definition: java_types.h:723
java_bytecode_promotion
typet java_bytecode_promotion(const typet &)
Java does not support byte/short return types. These are always promoted.
Definition: java_types.cpp:269
java_class_typet::set_final
void set_final(bool is_final)
Definition: java_types.h:388
java_generic_parameter_tagt::type_variable
const type_variablet & type_variable() const
Definition: java_types.h:717
java_class_typet::set_interface
void set_interface(bool interface)
marks class an interface
Definition: java_types.h:458
java_class_typet::set_outer_class
void set_outer_class(const irep_idt &outer_class)
Definition: java_types.h:348
java_class_typet::componentt::componentt
componentt(const irep_idt &_name, typet _type)
Definition: java_types.h:204
java_annotationt::valuet::get_value
const exprt & get_value() const
Definition: java_types.h:37
java_class_typet::get_name
const irep_idt & get_name() const
Get the name of the struct, which can be used to look up its symbol in the symbol table.
Definition: java_types.h:557
java_class_typet::get_annotations
std::vector< java_annotationt > & get_annotations()
Definition: java_types.h:549
java_class_typet::set_is_stub
void set_is_stub(bool is_stub)
Definition: java_types.h:393
struct_union_typet::componentt
Definition: std_types.h:68
java_class_typet::set_super_class
void set_super_class(const irep_idt &super_class)
Definition: java_types.h:358
java_generic_struct_tag_typet::generic_typest
std::vector< reference_typet > generic_typest
Definition: java_types.h:860
java_method_typet::set_is_final
void set_is_final(bool is_final)
Definition: java_types.h:142
java_class_typet::components
const componentst & components() const
Definition: java_types.h:224
java_class_typet::methodt::get_descriptor
const irep_idt & get_descriptor() const
Gets the method's descriptor – the mangled form of its type.
Definition: java_types.h:286
java_generic_class_type_bound
const typet & java_generic_class_type_bound(size_t index, const typet &t)
Access information of the type bound of a generic java class type.
Definition: java_types.h:1051
java_class_typet::lambda_method_handles
java_lambda_method_handlest & lambda_method_handles()
Definition: java_types.h:524
java_class_typet::methodt::get_is_final
bool get_is_final() const
is a method 'final'?
Definition: java_types.h:262
is_reference
bool is_reference(const typet &type)
Returns true if the type is a reference.
Definition: std_types.cpp:143
java_generic_parameter_tagt::type_variablet
struct_tag_typet type_variablet
Definition: java_types.h:705
java_class_typet::set_access
void set_access(const irep_idt &access)
Definition: java_types.h:328
java_reference_typet::java_reference_typet
java_reference_typet(const struct_tag_typet &_subtype, std::size_t _width)
Definition: java_types.h:605
is_valid_java_array
bool is_valid_java_array(const struct_typet &)
Programmatic documentation of the structure of a Java array (of either primitives or references) type...
Definition: java_types.cpp:838
struct_typet
Structure type, corresponds to C style structs.
Definition: std_types.h:230
irept::add
irept & add(const irep_idt &name)
Definition: irep.cpp:116
java_reference_typet::subtype
const struct_tag_typet & subtype() const
Definition: java_types.h:617
java_implicitly_generic_class_typet::java_implicitly_generic_class_typet
java_implicitly_generic_class_typet(const java_class_typet &class_type, const implicit_generic_typest &generic_types)
Definition: java_types.h:1072
to_java_generic_parameter
const java_generic_parametert & to_java_generic_parameter(const typet &type)
Definition: java_types.h:827
java_implicitly_generic_class_typet::implicit_generic_typest
std::vector< java_generic_parametert > implicit_generic_typest
Definition: java_types.h:1070
java_class_typet::get_outer_class
const irep_idt & get_outer_class() const
Definition: java_types.h:343
is_java_generic_parameter_tag
bool is_java_generic_parameter_tag(const typet &type)
Checks whether the type is a java generic parameter/variable, e.g., T in List<T>.
Definition: java_types.h:751
java_generic_class_type_var
const irep_idt & java_generic_class_type_var(size_t index, const java_generic_class_typet &type)
Access information of type variables of a generic java class type.
Definition: java_types.h:1037
to_java_generic_parameter_tag
const java_generic_parameter_tagt & to_java_generic_parameter_tag(const typet &type)
Definition: java_types.h:759
java_generic_parameter_tagt::type_variablest
std::vector< type_variablet > type_variablest
Definition: java_types.h:735
java_reference_type
java_reference_typet java_reference_type(const struct_tag_typet &subtype)
Definition: java_types.cpp:93
get_dependencies_from_generic_parameters
void get_dependencies_from_generic_parameters(const std::string &, std::set< irep_idt > &)
Collect information about generic type parameters from a given signature.
Definition: java_types.cpp:996
java_generic_struct_tag_typet::generic_types
generic_typest & generic_types()
Definition: java_types.h:878
find_closing_semi_colon_for_reference_type
size_t find_closing_semi_colon_for_reference_type(const std::string src, size_t starting_point=0)
Finds the closing semi-colon ending a ClassTypeSignature that starts at starting_point.
Definition: java_types.cpp:516
java_generic_type_from_string
std::vector< typet > java_generic_type_from_string(const std::string &, const std::string &)
Converts the content of a generic class type into a vector of Java types, that is each type variable ...
Definition: java_types.cpp:749
java_annotationt::get_values
std::vector< valuet > & get_values()
Definition: java_types.h:59
erase_type_arguments
std::string erase_type_arguments(const std::string &)
Take a signature string and remove everything in angle brackets allowing for the type to be parsed no...
Definition: java_types.cpp:334
pointer_typet::base_type
const typet & base_type() const
The type of the data what we point to.
Definition: pointer_expr.h:35
java_class_typet::set_is_inner_class
void set_is_inner_class(const bool &is_inner_class)
Definition: java_types.h:338
irept::get_int
signed int get_int(const irep_idt &name) const
Definition: irep.cpp:63
irept::get_sub
subt & get_sub()
Definition: irep.h:456
java_char_type
unsignedbv_typet java_char_type()
Definition: java_types.cpp:61
java_class_typet::java_lambda_method_handlet::java_lambda_method_handlet
java_lambda_method_handlet(const class_method_descriptor_exprt &method_descriptor, method_handle_kindt handle_kind)
Definition: java_types.h:484
code_typet::parametert
Definition: std_types.h:555
can_cast_type< java_method_typet >
bool can_cast_type< java_method_typet >(const typet &type)
Definition: java_types.h:179
java_class_typet::set_name
void set_name(const irep_idt &name)
Set the name of the struct, which can be used to look up its symbol in the symbol table.
Definition: java_types.h:564
to_java_implicitly_generic_class_type
const java_implicitly_generic_class_typet & to_java_implicitly_generic_class_type(const java_class_typet &type)
Definition: java_types.h:1108
java_reference_array_type
java_reference_typet java_reference_array_type(const struct_tag_typet &element_type)
Definition: java_types.cpp:541
java_method_typet::java_method_typet
java_method_typet(parameterst &&_parameters, const typet &_return_type)
Constructs a new code type, i.e.
Definition: java_types.h:118
java_class_typet::componentt::get_is_final
bool get_is_final() const
is a field 'final'?
Definition: java_types.h:210
java_generic_struct_tag_typet
Class to hold type with generic type arguments, for example java.util.List in either a reference of t...
Definition: java_types.h:857
type_with_subtypet::subtype
const typet & subtype() const
Definition: type.h:172
java_method_typet::get_is_varargs
bool get_is_varargs() const
Definition: java_types.h:157
java_class_typet::java_lambda_method_handlet::get_lambda_method_descriptor
const class_method_descriptor_exprt & get_lambda_method_descriptor() const
Definition: java_types.h:498
java_method_typet::set_is_synthetic
void set_is_synthetic(bool is_synthetic)
Definition: java_types.h:172
irept
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition: irep.h:359
java_generic_parameter_tagt::get_name
const irep_idt get_name() const
Definition: java_types.h:729
java_class_typet::set_abstract
void set_abstract(bool abstract)
marks class abstract
Definition: java_types.h:422
java_class_typet::componentt::set_is_final
void set_is_final(const bool is_final)
is a field 'final'?
Definition: java_types.h:216
java_reference_typet
This is a specialization of reference_typet.
Definition: java_types.h:602
java_class_typet::method_handle_kindt
method_handle_kindt
Indicates what sort of code should be synthesised for a lambda call:
Definition: java_types.h:464
unsupported_java_class_signature_exceptiont::unsupported_java_class_signature_exceptiont
unsupported_java_class_signature_exceptiont(std::string type)
Definition: java_types.h:1134
java_generic_class_typet
Class to hold a class with generics, extends the java class type with a vector of java generic type p...
Definition: java_types.h:972
to_java_class_type
const java_class_typet & to_java_class_type(const typet &type)
Definition: java_types.h:582
java_class_typet::get_super_class
const irep_idt & get_super_class() const
Definition: java_types.h:353
to_java_method_type
const java_method_typet & to_java_method_type(const typet &type)
Definition: java_types.h:184
java_class_typet::get_is_stub
bool get_is_stub() const
Definition: java_types.h:398
annotated_typet::get_annotations
const std::vector< java_annotationt > & get_annotations() const
Definition: java_types.h:69
can_cast_type< class_typet >
bool can_cast_type< class_typet >(const typet &type)
Check whether a reference to a typet is a class_typet.
Definition: std_types.h:368
java_class_typet::lambda_method_handles
const java_lambda_method_handlest & lambda_method_handles() const
Definition: java_types.h:517
java_classname
struct_tag_typet java_classname(const std::string &)
Definition: java_types.cpp:809
std_expr.h
java_class_typet::get_access
const irep_idt & get_access() const
Definition: java_types.h:323
java_annotationt
Definition: java_types.h:21
java_method_typet
Definition: java_types.h:100
java_float_type
floatbv_typet java_float_type()
Definition: java_types.cpp:67
java_generics_get_index_for_subtype
const optionalt< size_t > java_generics_get_index_for_subtype(const std::vector< java_generic_parametert > &gen_types, const irep_idt &identifier)
Get the index in the subtypes array for a given component.
Definition: java_types.h:1160
c_types.h
java_method_typet::throws_exceptions
const std::vector< irep_idt > throws_exceptions() const
Definition: java_types.h:124
irept::get_bool
bool get_bool(const irep_idt &name) const
Definition: irep.cpp:58
java_class_typet::static_members
static_memberst & static_members()
Definition: java_types.h:318
java_boolean_type
c_bool_typet java_boolean_type()
Definition: java_types.cpp:79
java_class_typet::componentt::componentt
componentt()=default
java_generic_parametert::type_variable
const type_variablet & type_variable() const
Definition: java_types.h:789
parse_raw_list_types
std::vector< std::string > parse_raw_list_types(std::string src, char opening_bracket, char closing_bracket)
Given a substring of a descriptor or signature that contains one or more types parse out the individu...
Definition: java_types.cpp:419
java_class_typet::get_is_static_class
bool get_is_static_class() const
Definition: java_types.h:363
java_lang_object_type
java_reference_typet java_lang_object_type()
Definition: java_types.cpp:98
java_char_from_type
char java_char_from_type(const typet &type)
Definition: java_types.cpp:708
java_class_typet::methodt::set_descriptor
void set_descriptor(const irep_idt &id)
Sets the method's descriptor – the mangled form of its type.
Definition: java_types.h:292