< prev index next >

src/share/vm/oops/klass.cpp

Print this page




 507     // Add to null class loader list first before creating the mirror
 508     // (same order as class file parsing)
 509     loader_data->add_class(this);
 510   }
 511 
 512   // Recreate the class mirror.
 513   // Only recreate it if not present.  A previous attempt to restore may have
 514   // gotten an OOM later but keep the mirror if it was created.
 515   if (java_mirror() == NULL) {
 516     Handle loader = loader_data->class_loader();
 517     ModuleEntry* module_entry = NULL;
 518     Klass* k = this;
 519     if (k->is_objArray_klass()) {
 520       k = ObjArrayKlass::cast(k)->bottom_klass();
 521     }
 522     // Obtain klass' module.
 523     if (k->is_instance_klass()) {
 524       InstanceKlass* ik = (InstanceKlass*) k;
 525       module_entry = ik->module();
 526     } else {
 527       module_entry = ModuleEntryTable::javabase_module();
 528     }
 529     // Obtain java.lang.reflect.Module, if available
 530     Handle module_handle(THREAD, ((module_entry != NULL) ? JNIHandles::resolve(module_entry->module()) : (oop)NULL));
 531     java_lang_Class::create_mirror(this, loader, module_handle, protection_domain, CHECK);
 532   }
 533 }
 534 
 535 Klass* Klass::array_klass_or_null(int rank) {
 536   EXCEPTION_MARK;
 537   // No exception can be thrown by array_klass_impl when called with or_null == true.
 538   // (In anycase, the execption mark will fail if it do so)
 539   return array_klass_impl(true, rank, THREAD);
 540 }
 541 
 542 
 543 Klass* Klass::array_klass_or_null() {
 544   EXCEPTION_MARK;
 545   // No exception can be thrown by array_klass_impl when called with or_null == true.
 546   // (In anycase, the execption mark will fail if it do so)
 547   return array_klass_impl(true, THREAD);




 507     // Add to null class loader list first before creating the mirror
 508     // (same order as class file parsing)
 509     loader_data->add_class(this);
 510   }
 511 
 512   // Recreate the class mirror.
 513   // Only recreate it if not present.  A previous attempt to restore may have
 514   // gotten an OOM later but keep the mirror if it was created.
 515   if (java_mirror() == NULL) {
 516     Handle loader = loader_data->class_loader();
 517     ModuleEntry* module_entry = NULL;
 518     Klass* k = this;
 519     if (k->is_objArray_klass()) {
 520       k = ObjArrayKlass::cast(k)->bottom_klass();
 521     }
 522     // Obtain klass' module.
 523     if (k->is_instance_klass()) {
 524       InstanceKlass* ik = (InstanceKlass*) k;
 525       module_entry = ik->module();
 526     } else {
 527       module_entry = ModuleEntryTable::javabase_moduleEntry();
 528     }
 529     // Obtain java.lang.reflect.Module, if available
 530     Handle module_handle(THREAD, ((module_entry != NULL) ? JNIHandles::resolve(module_entry->module()) : (oop)NULL));
 531     java_lang_Class::create_mirror(this, loader, module_handle, protection_domain, CHECK);
 532   }
 533 }
 534 
 535 Klass* Klass::array_klass_or_null(int rank) {
 536   EXCEPTION_MARK;
 537   // No exception can be thrown by array_klass_impl when called with or_null == true.
 538   // (In anycase, the execption mark will fail if it do so)
 539   return array_klass_impl(true, rank, THREAD);
 540 }
 541 
 542 
 543 Klass* Klass::array_klass_or_null() {
 544   EXCEPTION_MARK;
 545   // No exception can be thrown by array_klass_impl when called with or_null == true.
 546   // (In anycase, the execption mark will fail if it do so)
 547   return array_klass_impl(true, THREAD);


< prev index next >