9 #ifndef CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_BASE_H
10 #define CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_BASE_H
48 using kindt =
enum { JAR, DIRECTORY };
62 std::optional<java_bytecode_parse_treet>
load_class(
70 const std::string &jar_file,
76 const std::string &path,
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A chache for jar_filet objects, by file name.
Base class for maintaining classpath.
void add_classpath_entry(const std::string &, message_handlert &)
Appends an entry to the class path, used for loading classes.
std::optional< java_bytecode_parse_treet > get_class_from_jar(const irep_idt &class_name, const std::string &jar_file, message_handlert &)
attempt to load a class from a given jar file
void clear_classpath()
Clear all classpath entries.
jar_poolt jar_pool
a cache for jar_filet, by path name
std::optional< java_bytecode_parse_treet > load_class(const irep_idt &class_name, const classpath_entryt &, message_handlert &)
attempt to load a class from a classpath_entry
static std::string class_name_to_os_file(const irep_idt &)
Convert a class name to a file name, with OS-dependent syntax.
std::optional< java_bytecode_parse_treet > get_class_from_directory(const irep_idt &class_name, const std::string &path, message_handlert &)
attempt to load a class from a given directory
static std::string class_name_to_jar_file(const irep_idt &)
Convert a class name to a file name, does the inverse of file_to_class_name.
std::list< classpath_entryt > classpath_entries
List of entries in the classpath.
static std::string file_to_class_name(const std::string &)
Convert a file name to the class name.
An entry in the classpath.
classpath_entryt(kindt _kind, const std::string &_path)
enum { JAR, DIRECTORY } kindt