src/hotspot/share/classfile/klassFactory.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff src/hotspot/share/classfile

src/hotspot/share/classfile/klassFactory.cpp

Print this page
rev 49528 : [mq]: module_path


  67                                            &cached_class_file);
  68     if (old_ptr != ptr) {
  69       // JVMTI agent has modified class file data.
  70       // Set new class file stream using JVMTI agent modified class file data.
  71       ClassLoaderData* loader_data =
  72         ClassLoaderData::class_loader_data(class_loader());
  73       int path_index = ik->shared_classpath_index();
  74       const char* pathname;
  75       if (path_index < 0) {
  76         // shared classes loaded by user defined class loader
  77         // do not have shared_classpath_index
  78         ModuleEntry* mod_entry = ik->module();
  79         if (mod_entry != NULL && (mod_entry->location() != NULL)) {
  80           ResourceMark rm;
  81           pathname = (const char*)(mod_entry->location()->as_C_string());
  82         } else {
  83           pathname = "";
  84         }
  85       } else {
  86         SharedClassPathEntry* ent =
  87           (SharedClassPathEntry*)FileMapInfo::shared_classpath(path_index);
  88         pathname = ent == NULL ? NULL : ent->name();
  89       }
  90       ClassFileStream* stream = new ClassFileStream(ptr,
  91                                                     end_ptr - ptr,
  92                                                     pathname,
  93                                                     ClassFileStream::verify);
  94       ClassFileParser parser(stream,
  95                              class_name,
  96                              loader_data,
  97                              protection_domain,
  98                              NULL,
  99                              NULL,
 100                              ClassFileParser::BROADCAST, // publicity level
 101                              CHECK_NULL);
 102       InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
 103                                                            CHECK_NULL);
 104       if (cached_class_file != NULL) {
 105         new_ik->set_cached_class_file(cached_class_file);
 106       }
 107 




  67                                            &cached_class_file);
  68     if (old_ptr != ptr) {
  69       // JVMTI agent has modified class file data.
  70       // Set new class file stream using JVMTI agent modified class file data.
  71       ClassLoaderData* loader_data =
  72         ClassLoaderData::class_loader_data(class_loader());
  73       int path_index = ik->shared_classpath_index();
  74       const char* pathname;
  75       if (path_index < 0) {
  76         // shared classes loaded by user defined class loader
  77         // do not have shared_classpath_index
  78         ModuleEntry* mod_entry = ik->module();
  79         if (mod_entry != NULL && (mod_entry->location() != NULL)) {
  80           ResourceMark rm;
  81           pathname = (const char*)(mod_entry->location()->as_C_string());
  82         } else {
  83           pathname = "";
  84         }
  85       } else {
  86         SharedClassPathEntry* ent =
  87           (SharedClassPathEntry*)FileMapInfo::shared_path(path_index);
  88         pathname = ent == NULL ? NULL : ent->name();
  89       }
  90       ClassFileStream* stream = new ClassFileStream(ptr,
  91                                                     end_ptr - ptr,
  92                                                     pathname,
  93                                                     ClassFileStream::verify);
  94       ClassFileParser parser(stream,
  95                              class_name,
  96                              loader_data,
  97                              protection_domain,
  98                              NULL,
  99                              NULL,
 100                              ClassFileParser::BROADCAST, // publicity level
 101                              CHECK_NULL);
 102       InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
 103                                                            CHECK_NULL);
 104       if (cached_class_file != NULL) {
 105         new_ik->set_cached_class_file(cached_class_file);
 106       }
 107 


src/hotspot/share/classfile/klassFactory.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File