jdk/src/share/classes/java/lang/management/ThreadInfo.java
changeset 401 ef01e0dccd63
parent 2 90ce3da70b43
child 715 f16baef3a20e
equal deleted inserted replaced
399:bcc2354430ff 401:ef01e0dccd63
    24  */
    24  */
    25 
    25 
    26 package java.lang.management;
    26 package java.lang.management;
    27 
    27 
    28 import javax.management.openmbean.CompositeData;
    28 import javax.management.openmbean.CompositeData;
       
    29 import sun.management.ManagementFactoryHelper;
    29 import sun.management.ThreadInfoCompositeData;
    30 import sun.management.ThreadInfoCompositeData;
    30 import static java.lang.Thread.State.*;
    31 import static java.lang.Thread.State.*;
    31 
    32 
    32 /**
    33 /**
    33  * Thread information. <tt>ThreadInfo</tt> contains the information
    34  * Thread information. <tt>ThreadInfo</tt> contains the information
   218                             StackTraceElement[] stackTrace,
   219                             StackTraceElement[] stackTrace,
   219                             MonitorInfo[] lockedMonitors,
   220                             MonitorInfo[] lockedMonitors,
   220                             LockInfo[] lockedSynchronizers) {
   221                             LockInfo[] lockedSynchronizers) {
   221         this.threadId = t.getId();
   222         this.threadId = t.getId();
   222         this.threadName = t.getName();
   223         this.threadName = t.getName();
   223         this.threadState =
   224         this.threadState = ManagementFactoryHelper.toThreadState(state);
   224             sun.management.ManagementFactory.toThreadState(state);
   225         this.suspended = ManagementFactoryHelper.isThreadSuspended(state);
   225         this.suspended =
   226         this.inNative = ManagementFactoryHelper.isThreadRunningNative(state);
   226             sun.management.ManagementFactory.isThreadSuspended(state);
       
   227         this.inNative =
       
   228             sun.management.ManagementFactory.isThreadRunningNative(state);
       
   229         this.blockedCount = blockedCount;
   227         this.blockedCount = blockedCount;
   230         this.blockedTime = blockedTime;
   228         this.blockedTime = blockedTime;
   231         this.waitedCount = waitedCount;
   229         this.waitedCount = waitedCount;
   232         this.waitedTime = waitedTime;
   230         this.waitedTime = waitedTime;
   233 
   231