Base class for maintaining classpath.
More...
#include <java_class_loader_base.h>
Base class for maintaining classpath.
Definition at line 22 of file java_class_loader_base.h.
◆ add_classpath_entry()
void java_class_loader_baset::add_classpath_entry |
( |
const std::string & |
path, |
|
|
message_handlert & |
message_handler |
|
) |
| |
Appends an entry to the class path, used for loading classes.
The argument may be 1) The name of a directory, used for searching for .class files 2) The name of a JAR file
Definition at line 22 of file java_class_loader_base.cpp.
◆ class_name_to_jar_file()
std::string java_class_loader_baset::class_name_to_jar_file |
( |
const irep_idt & |
class_name | ) |
|
|
static |
◆ class_name_to_os_file()
std::string java_class_loader_baset::class_name_to_os_file |
( |
const irep_idt & |
class_name | ) |
|
|
static |
Convert a class name to a file name, with OS-dependent syntax.
- Parameters
-
class_name | the name of the class |
- Returns
- the class name converted to file name
Definition at line 113 of file java_class_loader_base.cpp.
◆ clear_classpath()
void java_class_loader_baset::clear_classpath |
( |
| ) |
|
|
inline |
◆ file_to_class_name()
std::string java_class_loader_baset::file_to_class_name |
( |
const std::string & |
file | ) |
|
|
static |
Convert a file name to the class name.
Java interprets folders as packages, therefore a prefix of ./
is removed if necessary, and all /
are converted to .
. For example a class file ./com/diffblue/test.class
is converted to the class name com.diffblue.test
.
- Parameters
-
file | the name of the class file |
- Returns
- the file name converted to Java class name
Definition at line 62 of file java_class_loader_base.cpp.
◆ get_class_from_directory()
attempt to load a class from a given directory
Load class from directory.
- Parameters
-
class_name | name of class to load in Java source format |
path | directory to load from |
message_handler | message handler |
- Returns
- optional value of parse tree, empty if class cannot be loaded
Definition at line 193 of file java_class_loader_base.cpp.
◆ get_class_from_jar()
attempt to load a class from a given jar file
Load class from jar file.
- Parameters
-
class_name | name of class to load in Java source format |
jar_file | path of the jar file |
message_handler | message handler |
- Returns
- optional value of parse tree, empty if class cannot be loaded
Definition at line 158 of file java_class_loader_base.cpp.
◆ load_class()
◆ classpath_entries
◆ jar_pool
The documentation for this class was generated from the following files: