< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page

        

@@ -319,10 +319,20 @@
 
   DictionaryEntry* entry = get_entry(index, hash, name);
   return (entry != NULL) ? entry->instance_klass() : NULL;
 }
 
+InstanceKlass* Dictionary::replace_class(int index, unsigned hash,
+                               Symbol* name, InstanceKlass* k) {
+  DictionaryEntry* entry = get_entry(index, hash, name);
+  assert(entry != NULL, "InstanceKlass k should exist in dictionary");
+   
+  InstanceKlass** addr = entry->klass_addr();
+  InstanceKlass*  old  = *addr; 
+  *addr = k;
+  return old;
+}
 
 void Dictionary::add_protection_domain(int index, unsigned int hash,
                                        InstanceKlass* klass,
                                        Handle protection_domain,
                                        TRAPS) {
< prev index next >