< prev index next >

src/hotspot/share/classfile/classLoader.hpp

Print this page

*** 45,65 **** template <typename T> class GrowableArray; class ClassPathEntry : public CHeapObj<mtClass> { private: ClassPathEntry* volatile _next; public: ClassPathEntry* next() const; virtual ~ClassPathEntry() {} void set_next(ClassPathEntry* next); ! virtual bool is_modules_image() const = 0; ! virtual bool is_jar_file() const = 0; // Is this entry created from the "Class-path" attribute from a JAR Manifest? ! virtual bool from_class_path_attr() const = 0; virtual const char* name() const = 0; ! virtual JImageFile* jimage() const = 0; ! virtual void close_jimage() = 0; // Constructor ClassPathEntry() : _next(NULL) {} // Attempt to locate file_name through this class path entry. // Returns a class file parsing stream if successfull. virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0; --- 45,67 ---- template <typename T> class GrowableArray; class ClassPathEntry : public CHeapObj<mtClass> { private: ClassPathEntry* volatile _next; + protected: + const char* copy_path(const char*path); public: ClassPathEntry* next() const; virtual ~ClassPathEntry() {} void set_next(ClassPathEntry* next); ! virtual bool is_modules_image() const { return false; } ! virtual bool is_jar_file() const { return false; } // Is this entry created from the "Class-path" attribute from a JAR Manifest? ! virtual bool from_class_path_attr() const { return false; } virtual const char* name() const = 0; ! virtual JImageFile* jimage() const { return NULL; } ! virtual void close_jimage() {} // Constructor ClassPathEntry() : _next(NULL) {} // Attempt to locate file_name through this class path entry. // Returns a class file parsing stream if successfull. virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0;
*** 71,92 **** class ClassPathDirEntry: public ClassPathEntry { private: const char* _dir; // Name of directory public: - bool is_modules_image() const { return false; } - bool is_jar_file() const { return false; } - bool from_class_path_attr() const { return false; } const char* name() const { return _dir; } ! JImageFile* jimage() const { return NULL; } ! void close_jimage() {} ! ClassPathDirEntry(const char* dir); virtual ~ClassPathDirEntry() {} ClassFileStream* open_stream(const char* name, TRAPS); }; - // Type definitions for zip file and zip file entry typedef void* jzfile; typedef struct { char *name; /* entry name */ jlong time; /* modification time */ --- 73,90 ---- class ClassPathDirEntry: public ClassPathEntry { private: const char* _dir; // Name of directory public: const char* name() const { return _dir; } ! ClassPathDirEntry(const char* dir) { ! _dir = copy_path(dir); ! } virtual ~ClassPathDirEntry() {} ClassFileStream* open_stream(const char* name, TRAPS); }; // Type definitions for zip file and zip file entry typedef void* jzfile; typedef struct { char *name; /* entry name */ jlong time; /* modification time */
*** 102,117 **** private: jzfile* _zip; // The zip archive const char* _zip_name; // Name of zip archive bool _from_class_path_attr; // From the "Class-path" attribute of a jar file public: - bool is_modules_image() const { return false; } bool is_jar_file() const { return true; } bool from_class_path_attr() const { return _from_class_path_attr; } const char* name() const { return _zip_name; } - JImageFile* jimage() const { return NULL; } - void close_jimage() {} ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append, bool from_class_path_attr); virtual ~ClassPathZipEntry(); u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); ClassFileStream* open_stream(const char* name, TRAPS); void contents_do(void f(const char* name, void* context), void* context); --- 100,112 ----
*** 124,135 **** JImageFile* _jimage; const char* _name; DEBUG_ONLY(static ClassPathImageEntry* _singleton;) public: bool is_modules_image() const; - bool is_jar_file() const { return false; } - bool from_class_path_attr() const { return false; } bool is_open() const { return _jimage != NULL; } const char* name() const { return _name == NULL ? "" : _name; } JImageFile* jimage() const { return _jimage; } void close_jimage(); ClassPathImageEntry(JImageFile* jimage, const char* name); --- 119,128 ----
*** 154,165 **** ModuleClassPathList(Symbol* module_name); ~ModuleClassPathList(); void add_to_list(ClassPathEntry* new_entry); }; - class SharedPathsMiscInfo; - class ClassLoader: AllStatic { public: enum ClassLoaderType { BOOT_LOADER = 1, /* boot loader */ PLATFORM_LOADER = 2, /* PlatformClassLoader */ --- 147,156 ----
*** 228,239 **** static ClassPathEntry* _first_append_entry; // Last entry in linked list of appended ClassPathEntry instances static ClassPathEntry* _last_append_entry; // Info used by CDS - CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;) - CDS_ONLY(static ClassPathEntry* _app_classpath_entries;) CDS_ONLY(static ClassPathEntry* _last_app_classpath_entry;) CDS_ONLY(static ClassPathEntry* _module_path_entries;) CDS_ONLY(static ClassPathEntry* _last_module_path_entry;) CDS_ONLY(static void setup_app_search_path(const char* class_path);) --- 219,228 ----
*** 414,427 **** num_entries ++; e = e->next(); } return num_entries; } - static void finalize_shared_paths_misc_info(); - static int get_shared_paths_misc_info_size(); - static void* get_shared_paths_misc_info(); - static bool check_shared_paths_misc_info(void* info, int size, bool is_static); static void exit_with_path_failure(const char* error, const char* message); static char* skip_uri_protocol(char* source); static void record_result(InstanceKlass* ik, const ClassFileStream* stream, TRAPS); #endif static JImageLocationRef jimage_find_resource(JImageFile* jf, const char* module_name, --- 403,412 ----
< prev index next >