jdk/src/share/classes/sun/management/ThreadImpl.java
public ThreadInfo[] getThreadInfo(long[] ids, int maxDepth) {
{- -------------------------------------------
(1)
---------------------------------------- -}
verifyThreadIds(ids);
if (maxDepth < 0) {
throw new IllegalArgumentException(
"Invalid maxDepth parameter: " + maxDepth);
}
Util.checkMonitorAccess();
{- -------------------------------------------
(1) 結果を格納するための ThreadInfo 配列を生成する.
---------------------------------------- -}
ThreadInfo[] infos = new ThreadInfo[ids.length]; // nulls
{- -------------------------------------------
(1) sun.management.ThreadImpl.getThreadInfo1() を呼び出して,
生成した ThreadInfo 配列に実際のスレッド情報を詰める.
---------------------------------------- -}
if (maxDepth == Integer.MAX_VALUE) {
getThreadInfo1(ids, -1, infos);
} else {
getThreadInfo1(ids, maxDepth, infos);
}
{- -------------------------------------------
(1) 結果をリターン
---------------------------------------- -}
return infos;
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.