public class MonitorInfo extends LockInfo
| Constructor and Description | 
|---|
| MonitorInfo(String className, int identityHashCode, int stackDepth, StackTraceElement stackFrame)
              构造一个 
             MonitorInfo对象。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| static MonitorInfo | from(CompositeData cd)
              返回由给定的 
             CompositeData表示的 
             MonitorInfo对象。 
             | 
| int | getLockedStackDepth()
              返回堆栈跟踪中对象监视器被锁定的深度。 
             | 
| StackTraceElement | getLockedStackFrame()
              返回锁定对象监视器的堆栈帧。 
             | 
getClassName, getIdentityHashCode, toStringpublic MonitorInfo(String className, int identityHashCode, int stackDepth, StackTraceElement stackFrame)
className - 锁定对象的类的完全限定名称。 
           identityHashCode - 锁定对象的 
            identity hash code 。 
           stackDepth - 对象监视器被锁定的堆栈跟踪中的深度。 
           stackFrame - 锁定对象监视器的堆栈框架。 
           IllegalArgumentException - 如果 
            stackDepth†‰0 
            stackFrame是 
            null ,或 
            stackDepth <0但 
            stackFrame不是 
            null 。 
           public int getLockedStackDepth()
ThreadInfo.getStackTrace()方法中返回的StackTraceElement数组的索引。 
          public StackTraceElement getLockedStackFrame()
public static MonitorInfo from(CompositeData cd)
LockInfo类中mapped type中指定的属性: 
           
Attribute Name Type lockedStackFrame CompositeData as specified in the stackTrace attribute defined in the ThreadInfo.frommethod.lockedStackDepth java.lang.Integer 
cd - 
            CompositeData代表 
            MonitorInfo 
           IllegalArgumentException -如果 
            cd并不代表与上述属性的 
            MonitorInfo。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.