77 int path_index = ik->shared_classpath_index();
78 ClassFileStream* stream = new ClassFileStream(ptr,
79 end_ptr - ptr,
80 cfs->source(),
81 ClassFileStream::verify);
82 ClassFileParser parser(stream,
83 class_name,
84 loader_data,
85 protection_domain,
86 NULL,
87 NULL,
88 ClassFileParser::BROADCAST, // publicity level
89 CHECK_NULL);
90 InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
91 CHECK_NULL);
92 if (cached_class_file != NULL) {
93 new_ik->set_cached_class_file(cached_class_file);
94 }
95
96 if (class_loader.is_null()) {
97 ResourceMark rm;
98 ClassLoader::add_package(class_name->as_C_string(), path_index, THREAD);
99 }
100
101 return new_ik;
102 }
103 }
104 #endif
105
106 return NULL;
107 }
108
109
110 static ClassFileStream* check_class_file_load_hook(ClassFileStream* stream,
111 Symbol* name,
112 ClassLoaderData* loader_data,
113 Handle protection_domain,
114 JvmtiCachedClassFileData** cached_class_file,
115 TRAPS) {
116
117 assert(stream != NULL, "invariant");
118
|
77 int path_index = ik->shared_classpath_index();
78 ClassFileStream* stream = new ClassFileStream(ptr,
79 end_ptr - ptr,
80 cfs->source(),
81 ClassFileStream::verify);
82 ClassFileParser parser(stream,
83 class_name,
84 loader_data,
85 protection_domain,
86 NULL,
87 NULL,
88 ClassFileParser::BROADCAST, // publicity level
89 CHECK_NULL);
90 InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
91 CHECK_NULL);
92 if (cached_class_file != NULL) {
93 new_ik->set_cached_class_file(cached_class_file);
94 }
95
96 if (class_loader.is_null()) {
97 ClassLoader::add_package(new_ik, path_index, THREAD);
98 }
99
100 return new_ik;
101 }
102 }
103 #endif
104
105 return NULL;
106 }
107
108
109 static ClassFileStream* check_class_file_load_hook(ClassFileStream* stream,
110 Symbol* name,
111 ClassLoaderData* loader_data,
112 Handle protection_domain,
113 JvmtiCachedClassFileData** cached_class_file,
114 TRAPS) {
115
116 assert(stream != NULL, "invariant");
117
|