2362N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Information about an object monitor lock. An object monitor is locked 0N/A * when entering a synchronization block or method on that object. 0N/A * <h4>MXBean Mapping</h4> 0N/A * <tt>MonitorInfo</tt> is mapped to a {@link CompositeData CompositeData} 0N/A * with attributes as specified in 0N/A * the {@link #from from} method. 0N/A * @author Mandy Chung 0N/A * Construct a <tt>MonitorInfo</tt> object. 0N/A * @param className the fully qualified name of the class of the lock object. 0N/A * @param identityHashCode the {@link System#identityHashCode 0N/A * identity hash code} of the lock object. 0N/A * @param stackDepth the depth in the stack trace where the object monitor 0N/A * @param stackFrame the stack frame that locked the object monitor. 0N/A * @throws IllegalArgumentException if 0N/A * <tt>stackDepth</tt> ≥ 0 but <tt>stackFrame</tt> is <tt>null</tt>, 0N/A * or <tt>stackDepth</tt> < 0 but <tt>stackFrame</tt> is not 0N/A * Returns the depth in the stack trace where the object monitor 0N/A * was locked. The depth is the index to the <tt>StackTraceElement</tt> 0N/A * array returned in the {@link ThreadInfo#getStackTrace} method. 0N/A * @return the depth in the stack trace where the object monitor 0N/A * was locked, or a negative number if not available. 0N/A * Returns the stack frame that locked the object monitor. 0N/A * @return <tt>StackTraceElement</tt> that locked the object monitor, 0N/A * or <tt>null</tt> if not available. 0N/A * Returns a <tt>MonitorInfo</tt> object represented by the 0N/A * given <tt>CompositeData</tt>. 0N/A * The given <tt>CompositeData</tt> must contain the following attributes 0N/A * as well as the attributes specified in the 0N/A * mapped type</a> for the {@link LockInfo} class: 0N/A * <th align=left>Attribute Name</th> 0N/A * <th align=left>Type</th> 0N/A * <td>lockedStackFrame</td> 0N/A * <td><tt>CompositeData as specified in the 0N/A * attribute defined in the {@link ThreadInfo#from 0N/A * ThreadInfo.from} method. 0N/A * <td>lockedStackDepth</td> 0N/A * <td><tt>java.lang.Integer</tt></td> 0N/A * @param cd <tt>CompositeData</tt> representing a <tt>MonitorInfo</tt> 0N/A * @throws IllegalArgumentException if <tt>cd</tt> does not 0N/A * represent a <tt>MonitorInfo</tt> with the attributes described 0N/A * @return a <tt>MonitorInfo</tt> object represented 0N/A * by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>; 0N/A * <tt>null</tt> otherwise.