378 // Returns null if the package was not loaded. 379 // Note: The specified name can either be the name of a class or package. 380 // If a package name is specified, then it must be "/"-separator and also 381 // end with a trailing "/". 382 static oop get_system_package(const char* name, TRAPS); 383 384 // Returns an array of Java strings representing all of the currently 385 // loaded system packages. 386 // Note: The package names returned are "/"-separated and end with a 387 // trailing "/". 388 static objArrayOop get_system_packages(TRAPS); 389 390 // Initialization 391 static void initialize(); 392 static void classLoader_init2(TRAPS); 393 CDS_ONLY(static void initialize_shared_path();) 394 395 static int compute_Object_vtable(); 396 397 static ClassPathEntry* classpath_entry(int n) { 398 if (n == 0) { 399 assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds"); 400 return ClassLoader::_jrt_entry; 401 } else { 402 // The java runtime image is always the first entry 403 // in the FileMapInfo::_classpath_entry_table. Even though 404 // the _jrt_entry is not included in the _first_append_entry 405 // linked list, it must be accounted for when comparing the 406 // class path vs. the shared archive class path. 407 ClassPathEntry* e = ClassLoader::_first_append_entry; 408 while (--n >= 1) { 409 assert(e != NULL, "Not that many classpath entries."); 410 e = e->next(); 411 } 412 return e; 413 } 414 } 415 416 static bool is_in_patch_mod_entries(Symbol* module_name); 417 418 #if INCLUDE_CDS 419 // Sharing dump and restore 420 421 static void check_shared_classpath(const char *path); 422 static void finalize_shared_paths_misc_info(); 423 static int get_shared_paths_misc_info_size(); 424 static void* get_shared_paths_misc_info(); 425 static bool check_shared_paths_misc_info(void* info, int size); 426 static void exit_with_path_failure(const char* error, const char* message); 427 428 static s2 module_to_classloader(const char* module_name); 429 static void initialize_module_loader_map(JImageFile* jimage); 430 static s2 classloader_type(Symbol* class_name, ClassPathEntry* e, 431 int classpath_index, TRAPS); 432 #endif 433 | 378 // Returns null if the package was not loaded. 379 // Note: The specified name can either be the name of a class or package. 380 // If a package name is specified, then it must be "/"-separator and also 381 // end with a trailing "/". 382 static oop get_system_package(const char* name, TRAPS); 383 384 // Returns an array of Java strings representing all of the currently 385 // loaded system packages. 386 // Note: The package names returned are "/"-separated and end with a 387 // trailing "/". 388 static objArrayOop get_system_packages(TRAPS); 389 390 // Initialization 391 static void initialize(); 392 static void classLoader_init2(TRAPS); 393 CDS_ONLY(static void initialize_shared_path();) 394 395 static int compute_Object_vtable(); 396 397 static ClassPathEntry* classpath_entry(int n) { 398 assert(n >= 0 && n < _num_entries, "sanity"); 399 if (n == 0) { 400 assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds"); 401 return ClassLoader::_jrt_entry; 402 } else { 403 // The java runtime image is always the first entry 404 // in the FileMapInfo::_classpath_entry_table. Even though 405 // the _jrt_entry is not included in the _first_append_entry 406 // linked list, it must be accounted for when comparing the 407 // class path vs. the shared archive class path. 408 ClassPathEntry* e = ClassLoader::_first_append_entry; 409 while (--n >= 1) { 410 assert(e != NULL, "Not that many classpath entries."); 411 e = e->next(); 412 } 413 return e; 414 } 415 } 416 417 static int number_of_classpath_entries() { 418 return _num_entries; 419 } 420 421 static bool is_in_patch_mod_entries(Symbol* module_name); 422 423 #if INCLUDE_CDS 424 // Sharing dump and restore 425 426 static void check_shared_classpath(const char *path); 427 static void finalize_shared_paths_misc_info(); 428 static int get_shared_paths_misc_info_size(); 429 static void* get_shared_paths_misc_info(); 430 static bool check_shared_paths_misc_info(void* info, int size); 431 static void exit_with_path_failure(const char* error, const char* message); 432 433 static s2 module_to_classloader(const char* module_name); 434 static void initialize_module_loader_map(JImageFile* jimage); 435 static s2 classloader_type(Symbol* class_name, ClassPathEntry* e, 436 int classpath_index, TRAPS); 437 #endif 438 |