< prev index next >
src/hotspot/share/classfile/classLoaderData.cpp
Print this page
@@ -966,5 +966,16 @@
for (Klass* k = Atomic::load_acquire(&_klasses); k != NULL; k = k->next_link()) {
if (k == klass) return true;
}
return false;
}
+
+Klass* ClassLoaderData::find_class(Symbol* name) {
+ Dictionary* dict = dictionary();
+ unsigned hash = dict->compute_hash(name);
+ int index = dict->hash_to_index(hash);
+ {
+ // find_class assert on SystemDictionary_lock or safepoint
+ MutexLocker lock(SystemDictionary_lock);
+ return dict->find_class(index, hash, name);
+ }
+}
< prev index next >