ROSE 0.11.145.267
|
Disassembly and partitioning utility functions for JVM.
Utility functions, primarily for handling Java jar files.
Classes | |
struct | FileStat |
This class represents the contents of a central directory file header in a zip file. More... | |
struct | Zipper |
Functions | |
bool | isJavaClassFile (const boost::filesystem::path &) |
True if named file exists and is a Java class file. | |
bool | isJavaJarFile (const boost::filesystem::path &) |
True if named file exists and is a Java jar file. | |
boost::filesystem::path | pathToClassFile (const std::string &fqcn, const std::vector< std::string > &cp) |
Searchs the classpath setting for the path to a fully qualified class name. | |
bool | present (const std::string &fqcn, const std::string &path) |
Searchs the path for the presence of a fully qualified class name. | |
void | warn (const std::string &msg) |
anonymous enum |
Definition at line 52 of file ModulesJvm.h.
anonymous enum |
Definition at line 101 of file ModulesJvm.h.
|
protected |
True if named file exists and is a Java class file.
Class files usually have names with a ".class" extension, although this function actually tries to open the file and parse the file header to make that determination.
References isJavaClassFile().
Referenced by isJavaClassFile().
|
protected |
True if named file exists and is a Java jar file.
Jar files usually have names with a ".jar" extension, although this function actually tries to open the file and parse the file header to make that determination.
References isJavaJarFile().
Referenced by isJavaJarFile().
|
protected |
Searchs the classpath setting for the path to a fully qualified class name.
This function takes a fully qualified class name (FQCN) and converts it into a corresponding filesystem path by replacing the namespace separators ('.') with directory separators appropriate for the operating system. It then searches for the class in the classpath setting. If found, the resulting path can be used to locate the class file within a directory structure, either in the file system or within a jar file. If the class can't be located, an empty path is returned.
fqcn | The fully qualified class name, e.g., "com.example.MyClass". |
cp | The classpath. A ':' separated list of paths to jar files or directories". @return A boost::filesystem::path representing the location of the class file, e.g., "com/example/MyClass.class". |
References pathToClassFile().
Referenced by pathToClassFile().
|
protected |
Searchs the path for the presence of a fully qualified class name.
Searches all classes and jar files found in the path for the fully qualified class name (FQCN). Namespace separators in the class name may be '.' or '/'. Path separator in the classpath is ':'.
fqcn | The fully qualified class name, e.g., "com.example.MyClass". |
path | Path to a jar file, class file, or directory. |
References present().
Referenced by present().