src/share/vm/oops/instanceKlass.cpp
Print this page
@@ -1477,10 +1477,25 @@
dont_ignore_overpasses = false; // Ignore overpass methods in all superclasses.
}
return NULL;
}
+#ifdef ASSERT
+// search through class hierarchy and return true if this class or
+// one of the superclasses was redefined
+bool InstanceKlass::has_redefined_super() const {
+ Klass* klass = const_cast<InstanceKlass*>(this);
+ while (klass != NULL) {
+ if (InstanceKlass::cast(klass)->has_been_redefined()) {
+ return true;
+ }
+ klass = InstanceKlass::cast(klass)->super();
+ }
+ return false;
+}
+#endif
+
// lookup a method in the default methods list then in all transitive interfaces
// Do NOT return private or static methods
Method* InstanceKlass::lookup_method_in_ordered_interfaces(Symbol* name,
Symbol* signature) const {
Method* m = NULL;