hotspot/src/share/vm/interpreter/linkResolver.cpp
// returns first instance method
void LinkResolver::lookup_instance_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
{- -------------------------------------------
(1) instanceKlass::uncached_lookup_method() を呼んで, 対象メソッドを探す.
---------------------------------------- -}
methodOop result_oop = klass->uncached_lookup_method(name, signature);
{- -------------------------------------------
(1) 結果を handle 化し, result 引数で指定された箇所にセット.
ただし, 見つかったのが static method(?) だった場合は,
そうではないメソッドが見つかるまでスーパークラスを再帰的に調べ直す.
---------------------------------------- -}
result = methodHandle(THREAD, result_oop);
while (!result.is_null() && result->is_static()) {
klass = KlassHandle(THREAD, Klass::cast(result->method_holder())->super());
result = methodHandle(THREAD, klass->uncached_lookup_method(name, signature));
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.