hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 20284 595a25ab9474
parent 20282 7f9cbdf89af2
child 20379 a4c59d30d67d
equal deleted inserted replaced
20283:ddf704c33210 20284:595a25ab9474
  1417   }
  1417   }
  1418   return NULL;
  1418   return NULL;
  1419 }
  1419 }
  1420 
  1420 
  1421 // lookup a method in all the interfaces that this class implements
  1421 // lookup a method in all the interfaces that this class implements
       
  1422 // Do NOT return private or static methods, new in JDK8 which are not externally visible
       
  1423 // They should only be found in the initial InterfaceMethodRef
  1422 Method* InstanceKlass::lookup_method_in_all_interfaces(Symbol* name,
  1424 Method* InstanceKlass::lookup_method_in_all_interfaces(Symbol* name,
  1423                                                          Symbol* signature) const {
  1425                                                          Symbol* signature) const {
  1424   Array<Klass*>* all_ifs = transitive_interfaces();
  1426   Array<Klass*>* all_ifs = transitive_interfaces();
  1425   int num_ifs = all_ifs->length();
  1427   int num_ifs = all_ifs->length();
  1426   InstanceKlass *ik = NULL;
  1428   InstanceKlass *ik = NULL;
  1427   for (int i = 0; i < num_ifs; i++) {
  1429   for (int i = 0; i < num_ifs; i++) {
  1428     ik = InstanceKlass::cast(all_ifs->at(i));
  1430     ik = InstanceKlass::cast(all_ifs->at(i));
  1429     Method* m = ik->lookup_method(name, signature);
  1431     Method* m = ik->lookup_method(name, signature);
  1430     if (m != NULL) {
  1432     if (m != NULL && m->is_public() && !m->is_static()) {
  1431       return m;
  1433       return m;
  1432     }
  1434     }
  1433   }
  1435   }
  1434   return NULL;
  1436   return NULL;
  1435 }
  1437 }