hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp
static void increment(klassOop k) {
{- -------------------------------------------
(1) JvmtiGetLoadedClassesClosure::get_this() を呼んで,
予めセットしておいた JvmtiGetLoadedClassesClosure オブジェクトを取り出す
(See: JvmtiGetLoadedClassesClosure::JvmtiGetLoadedClassesClosure())
---------------------------------------- -}
JvmtiGetLoadedClassesClosure* that = JvmtiGetLoadedClassesClosure::get_this();
{- -------------------------------------------
(1) JvmtiGetLoadedClassesClosure::set_count() を必要な回数だけ呼んでカウントアップする.
---------------------------------------- -}
if (that->get_initiatingLoader() == NULL) {
for (klassOop l = k; l != NULL; l = Klass::cast(l)->array_klass_or_null()) {
that->set_count(that->get_count() + 1);
}
} else if (k != NULL) {
// if initiating loader not null, just include the instance with 1 dimension
that->set_count(that->get_count() + 1);
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.