hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp
static void add(klassOop k) {
{- -------------------------------------------
(1) JvmtiGetLoadedClassesClosure::get_this() を呼んで,
予めセットしておいた JvmtiGetLoadedClassesClosure オブジェクトを取り出す
(See: JvmtiGetLoadedClassesClosure::JvmtiGetLoadedClassesClosure())
---------------------------------------- -}
JvmtiGetLoadedClassesClosure* that = JvmtiGetLoadedClassesClosure::get_this();
{- -------------------------------------------
(1) 該当するクラスオブジェクト全てに対して
JvmtiGetLoadedClassesClosure::set_element() を呼び出し,
それらを JvmtiGetLoadedClassesClosure 内に登録する.
---------------------------------------- -}
if (that->available()) {
if (that->get_initiatingLoader() == NULL) {
for (klassOop l = k; l != NULL; l = Klass::cast(l)->array_klass_or_null()) {
oop mirror = Klass::cast(l)->java_mirror();
that->set_element(that->get_index(), mirror);
that->set_index(that->get_index() + 1);
}
} else if (k != NULL) {
// if initiating loader not null, just include the instance with 1 dimension
oop mirror = Klass::cast(k)->java_mirror();
that->set_element(that->get_index(), mirror);
that->set_index(that->get_index() + 1);
}
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.