--- old/src/share/vm/classfile/classLoader.hpp 2015-06-23 14:27:53.000000000 +0200 +++ new/src/share/vm/classfile/classLoader.hpp 2015-06-23 14:27:53.000000000 +0200 @@ -32,9 +32,14 @@ // The VM class loader. #include +// Name of boot module image +#define BOOT_IMAGE_NAME "bootmodules.jimage" // Class path entry (directory or zip file) +class ImageFileReader; +class ImageModuleData; + class ClassPathEntry: public CHeapObj { private: ClassPathEntry* _next; @@ -47,6 +52,7 @@ } virtual bool is_jar_file() = 0; virtual const char* name() = 0; + virtual ImageFileReader* image() = 0; virtual bool is_lazy(); // Constructor ClassPathEntry(); @@ -63,8 +69,9 @@ private: const char* _dir; // Name of directory public: - bool is_jar_file() { return false; } - const char* name() { return _dir; } + bool is_jar_file() { return false; } + const char* name() { return _dir; } + ImageFileReader* image() { return NULL; } ClassPathDirEntry(const char* dir); ClassFileStream* open_stream(const char* name, TRAPS); // Debugging @@ -92,8 +99,9 @@ jzfile* _zip; // The zip archive const char* _zip_name; // Name of zip archive public: - bool is_jar_file() { return true; } - const char* name() { return _zip_name; } + bool is_jar_file() { return true; } + const char* name() { return _zip_name; } + ImageFileReader* image() { return NULL; } ClassPathZipEntry(jzfile* zip, const char* zip_name); ~ClassPathZipEntry(); u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); @@ -116,7 +124,8 @@ ClassPathEntry* resolve_entry(TRAPS); public: bool is_jar_file(); - const char* name() { return _path; } + const char* name() { return _path; } + ImageFileReader* image() { return NULL; } LazyClassPathEntry(const char* path, const struct stat* st, bool throw_exception); virtual ~LazyClassPathEntry(); u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); @@ -129,15 +138,17 @@ }; // For java image files -class ImageFile; class ClassPathImageEntry: public ClassPathEntry { private: - ImageFile *_image; + ImageFileReader* _image; + ImageModuleData* _module_data; public: bool is_jar_file() { return false; } bool is_open() { return _image != NULL; } const char* name(); - ClassPathImageEntry(char* name); + ImageFileReader* image() { return _image; } + ImageModuleData* module_data() { return _module_data; } + ClassPathImageEntry(ImageFileReader* image); ~ClassPathImageEntry(); ClassFileStream* open_stream(const char* name, TRAPS);