Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.cpp @ 12318:36b97be47bde
8011311: Private interface methods. Default conflicts:ICCE. no erased_super_default.
Reviewed-by: coleenp, bharadwaj, minqi
author | acorn |
---|---|
date | Tue, 01 Oct 2013 08:10:42 -0400 |
parents | 190899198332 |
children | cefad50507d8 3374b92de2d9 |
comparison
equal
deleted
inserted
replaced
12317:a5ac0873476c | 12318:36b97be47bde |
---|---|
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 } |