jdk/src/share/classes/java/lang/ClassLoader.java
// Invoked in the VM class linking code.
static long findNative(ClassLoader loader, String name) {
{- -------------------------------------------
(1) 調べる対象は, 引数の loader が null であれば systemNativeLibraries,
null でなければその ClassLoader の nativeLibraries とする.
---------------------------------------- -}
Vector<NativeLibrary> libs =
loader != null ? loader.nativeLibraries : systemNativeLibraries;
{- -------------------------------------------
(1) 各 NativeLibrary オブジェクトの NativeLibrary::find() を呼び出して探索を行う.
見つかればその結果を返す.
---------------------------------------- -}
synchronized (libs) {
int size = libs.size();
for (int i = 0; i < size; i++) {
NativeLibrary lib = libs.elementAt(i);
long entry = lib.find(name);
if (entry != 0)
return entry;
}
}
{- -------------------------------------------
(1) 全部探して見つからなければ 0 を返す.
---------------------------------------- -}
return 0;
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.