hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 21768 b7dba4cde1c6
parent 21581 73584c201e2d
child 21917 325b980b3208
child 21913 0e2fd7282ac6
child 22859 7b88983393b7
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Sat Nov 23 12:25:13 2013 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Tue Nov 26 09:52:22 2013 -0500
@@ -1051,6 +1051,18 @@
   return false;
 }
 
+bool InstanceKlass::is_same_or_direct_interface(Klass *k) const {
+  // Verify direct super interface
+  if (this == k) return true;
+  assert(k->is_interface(), "should be an interface class");
+  for (int i = 0; i < local_interfaces()->length(); i++) {
+    if (local_interfaces()->at(i) == k) {
+      return true;
+    }
+  }
+  return false;
+}
+
 objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) {
   if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
   if (length > arrayOopDesc::max_array_length(T_OBJECT)) {