java.lang.management
Class LockInfo

java.lang.Object
  extended by java.lang.management.LockInfo
Direct Known Subclasses:
MonitorInfo

public class LockInfo
extends Object

Provides information on a lock held by a thread. A lock can be either a built-in monitor, an ownable synchronizer (i.e. a subclass of java.util.concurrent.locks.AbstractOwnableSynchronizer), or a Condition object.

Since:
1.6

Constructor Summary
LockInfo(String className, int identityHashCode)
          Constructs a new LockInfo object with the specified class name and identity hash code.
 
Method Summary
 String getClassName()
          Returns the class name of the lock object.
 int getIdentityHashCode()
          Returns the identity hash code of the lock object.
 String toString()
          Returns a textual representation of the lock, constructed by concatenating the class name, '@' and the identity hash code in unsigned hexadecimal form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockInfo

@ConstructorProperties(value={"className","identityHashCode"})
public LockInfo(String className,
                                           int identityHashCode)
Constructs a new LockInfo object with the specified class name and identity hash code.

Parameters:
className - the name of the class of the lock object.
identityHashCode - the identity hash code of the lock object.
Method Detail

getClassName

public String getClassName()
Returns the class name of the lock object.

Returns:
the class name of the lock object.

getIdentityHashCode

public int getIdentityHashCode()
Returns the identity hash code of the lock object.

Returns:
the identity hash code of the lock object.

toString

public String toString()
Returns a textual representation of the lock, constructed by concatenating the class name, '@' and the identity hash code in unsigned hexadecimal form.

Overrides:
toString in class Object
Returns:
a textual representation of the lock.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)