CBMC
java_class_loader_limit.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: limit class path loading
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_LIMIT_H
13 #define CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_LIMIT_H
14 
15 #include <set>
16 #include <regex>
17 
18 #include <util/message.h>
19 
22 {
24 
27  std::regex regex_matcher;
28  std::set<std::string> set_matcher;
29 
30  void setup_class_load_limit(const std::string &);
31 
32 public:
34  message_handlert &message_handler,
35  const std::string &java_cp_include_files)
36  : log(message_handler)
37  {
38  setup_class_load_limit(java_cp_include_files);
39  }
40 
41  bool load_class_file(const std::string &class_file_name);
42 };
43 
44 #endif
Class representing a filter for class file loading.
java_class_loader_limitt(message_handlert &message_handler, const std::string &java_cp_include_files)
void setup_class_load_limit(const std::string &)
Initializes class with either regex matcher or match set.
bool use_regex_match
Whether to use regex_matcher instead of set_matcher.
std::set< std::string > set_matcher
bool load_class_file(const std::string &class_file_name)
Use the class load limiter to decide whether a class file should be loaded or not.
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155