ThreadsListEnumerator のコンストラクタ内でスレッド一覧を取得し, それを java.lang.Thread[] に詰め直して返すだけ.
JVM_GetAllThreads() (= java.lang.Thread.getThreads()) -> ThreadsListEnumerator::ThreadsListEnumerator() -> ThreadsListEnumerator::get_threadObj()
See: here for details
java.lang.Thread.getThreads() は JVM_GetAllThreads() で実装されている.
((cite: jdk/src/share/native/java/lang/Thread.c))
static JNINativeMethod methods[] = {
...
{"getThreads", "()[" THD, (void *)&JVM_GetAllThreads},
See: here for details
See: here for details
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.