hotspot/src/share/vm/prims/nativeLookup.cpp
address NativeLookup::lookup_base(methodHandle method, bool& in_base_library, TRAPS) {
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
address entry = NULL;
ResourceMark rm(THREAD);
{- -------------------------------------------
(1) まず, NativeLookup::lookup_entry() で探してみる.
見つかればここでリターン.
---------------------------------------- -}
entry = lookup_entry(method, in_base_library, THREAD);
if (entry != NULL) return entry;
{- -------------------------------------------
(1) もし NativeLookup::lookup_entry() で見つからなければ,
JVMTI で指定された prefix を除去すれば見つかる可能性が残っているため
NativeLookup::lookup_entry_prefixed() で探してみる.
見つかればここでリターン.
---------------------------------------- -}
// standard native method resolution has failed. Check if there are any
// JVM TI prefixes which have been applied to the native method name.
entry = lookup_entry_prefixed(method, in_base_library, THREAD);
if (entry != NULL) return entry;
{- -------------------------------------------
(1) どちらでも見つからなければ UnsatisfiedLinkError.
---------------------------------------- -}
// Native function not found, throw UnsatisfiedLinkError
THROW_MSG_0(vmSymbols::java_lang_UnsatisfiedLinkError(),
method->name_and_sig_as_C_string());
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.