10 #ifndef CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_H 11 #define CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_H 32 typedef std::map<irep_idt, parse_tree_with_overlayst>
36 typedef std::function<std::vector<irep_idt>(
const irep_idt &)>
73 for(
const auto &
id : classes)
117 const std::string &buffer_name,
150 const std::string &jar_path);
153 const std::string &jar_file,
158 #endif // CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_H std::map< std::string, jar_indext > jars_by_path
The jar_indext for each jar file we've read.
jar_index_optcreft read_jar_file(java_class_loader_limitt &class_loader_limit, const std::string &jar_path)
std::list< std::string > jar_files
List of filesystem paths to .jar files that will be used, in the given order, to find and load a clas...
const jar_indext & get_jar_index(const std::string &jar_path)
std::vector< irep_idt > java_load_classes
Classes to be explicitly loaded.
std::function< std::vector< irep_idt >const irep_idt &)> get_extra_class_refs_functiont
A function that yields a list of extra dependencies based on a class name.
parse_tree_with_overlayst & get_parse_tree(java_class_loader_limitt &class_loader_limit, const irep_idt &class_name)
Given a class_name (e.g.
std::map< irep_idt, parse_tree_with_overlayst > parse_tree_with_overridest_mapt
jar_filet & jar_pool(java_class_loader_limitt &limit, const std::string &filename)
Load jar archive or retrieve from cache if already loaded.
std::map< irep_idt, std::string > jar_indext
A map associating logical class names with the name of the .class file implementing it for all classe...
std::list< java_bytecode_parse_treet > parse_tree_with_overlayst
void load_entire_jar(java_class_loader_limitt &, const std::string &jar_path)
static std::string file_to_class_name(const std::string &)
fixed_keys_map_wrappert< parse_tree_with_overridest_mapt > get_class_with_overlays_map()
Map from class names to the bytecode parse trees.
void add_jar_file(const std::string &f)
void set_java_cp_include_files(const std::string &java_cp_include_files)
nonstd::optional< T > optionalt
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Class representing a .jar archive.
void add_load_classes(const std::vector< irep_idt > &classes)
Adds the list of classes to the load queue, forcing them to be loaded even without explicit reference...
A wrapper for maps that gives read-write access to elements but without allowing addition or removal ...
void set_extra_class_refs_function(get_extra_class_refs_functiont func)
Sets a function that provides extra dependencies for a particular class.
optionalt< std::reference_wrapper< const jar_indext > > jar_index_optcreft
std::map< std::string, jar_filet > m_archives
Jar files that have been loaded.
get_extra_class_refs_functiont get_extra_class_refs
parse_tree_with_overlayst & operator()(const irep_idt &class_name)
const java_bytecode_parse_treet & get_original_class(const irep_idt &class_name)
optionalt< java_bytecode_parse_treet > get_class_from_jar(const irep_idt &class_name, const std::string &jar_file, const jar_indext &jar_index, java_class_loader_limitt &class_loader_limit)
std::string java_cp_include_files
Either a regular expression matching files that will be allowed to be loaded or a string of the form ...
parse_tree_with_overridest_mapt class_map
Map from class names to the bytecode parse trees.
static std::string class_name_to_file(const irep_idt &)