cprover
java_utils.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 #include "java_utils.h"
10 
11 #include <util/prefix.h>
12 #include <util/std_types.h>
13 
14 bool java_is_array_type(const typet &type)
15 {
16  if(type.id()!=ID_struct)
17  return false;
18  return has_prefix(id2string(
19  to_struct_type(type).get_tag()),
20  "java::array[");
21 }
The type of an expression.
Definition: type.h:20
const std::string & id2string(const irep_idt &d)
Definition: irep.h:44
bool java_is_array_type(const typet &type)
Definition: java_utils.cpp:14
const irep_idt & id() const
Definition: irep.h:189
bool has_prefix(const std::string &s, const std::string &prefix)
Definition: converter.cpp:13
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
Definition: std_types.h:317
API to type classes.