| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.management.LockInfo
java.lang.management.MonitorInfo
public class MonitorInfo
关于对象监视器锁的信息。当在该对象上输入一个同步块或方法时,则锁定对象监视器。
CompositeData,并具有 from 方法中指定的属性。
| 构造方法摘要 | |
|---|---|
| MonitorInfo(String className,
            int identityHashCode,
            int stackDepth,
            StackTraceElement stackFrame)构造一个 MonitorInfo 对象。 | |
| 方法摘要 | |
|---|---|
| static MonitorInfo | from(CompositeData cd)返回给定 CompositeData 表示的 MonitorInfo 对象。 | 
|  int | getLockedStackDepth()返回锁定对象监视器的堆栈跟踪中的深度。 | 
|  StackTraceElement | getLockedStackFrame()返回锁定对象监视器的堆栈帧。 | 
| 从类 java.lang.management.LockInfo 继承的方法 | 
|---|
| getClassName, getIdentityHashCode, toString | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public MonitorInfo(String className,
                   int identityHashCode,
                   int stackDepth,
                   StackTraceElement stackFrame)
className - 锁对象的完全限定类名称。identityHashCode - 锁对象的标识哈希码。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 类映射类型中指定的属性: 
 
属性名称 类型 lockedStackFrame ThreadInfo.from方法中定义的 stackTrace 属性中指定的 CompositeData。lockedStackDepth java.lang.Integer 
cd - 表示 MonitorInfo 的 CompositeData
IllegalArgumentException - 如果 cd 不表示具有上述属性的 MonitorInfo。| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。