51 const std::string &java_cp_include_files)
60 debug() <<
"Limit loading to classes matching '" << java_cp_include_files
65 assert(java_cp_include_files.length()>1);
68 java_cp_include_files.substr(1),
71 throw "cannot read JSON input configuration for JAR loading";
72 if(!json_cp_config.is_object())
73 throw "the JSON file has a wrong format";
74 jsont include_files=json_cp_config[
"classFiles"];
76 throw "the JSON file has a wrong format";
77 for(
const jsont &file_entry : include_files.
array)
93 std::smatch string_matches;
94 if(std::regex_match(file_name, string_matches,
regex_matcher))
96 debug() << file_name +
" discarded since not matching loader regexp" <<
eom;
bool parse_json(std::istream &in, const std::string &filename, message_handlert &message_handler, jsont &dest)
std::set< std::string > set_matcher
#define PRECONDITION(CONDITION)
message_handlert & get_message_handler()
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.
bool use_regex_match
Whether to use regex_matcher instead of set_matcher.
void setup_class_load_limit(const std::string &)
Initializes class with either regex matcher or match set.