APIdia Launch Partner
Top Description Methods
com.sun.jdi

public Interface MonitorInfo

extends Mirror
Known Direct Implementers
com.sun.tools.jdi.MonitorInfoImpl

Information about a monitor owned by a thread.
Author
Swamy Venkataramanappa
Since
1.6

Method Summary

Modifier and TypeMethod and Description
public ObjectReference

Returns:

the ObjectReference object for the monitor.
monitor
()

Returns the ObjectReference object for the monitor.

public int

Returns:

the stack depth at which this monitor was acquired by the owning thread.
stackDepth
()

Returns the stack depth at which this monitor was acquired by the owning thread.

public ThreadReference

Returns:

a ThreadReference object for the thread that owns the monitor.
thread
()

Returns a ThreadReference object for the thread that owns the monitor.

Inherited from com.sun.jdi.Mirror:
toStringvirtualMachine

Method Detail

monitorback to summary
public ObjectReference monitor()

Returns the ObjectReference object for the monitor.

Returns:ObjectReference

the ObjectReference object for the monitor.

Exceptions
InvalidStackFrameException:
if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
Since
1.6
See Also
ThreadReference#ownedMonitorsAndFrames
stackDepthback to summary
public int stackDepth()

Returns the stack depth at which this monitor was acquired by the owning thread. Returns -1 if the implementation cannot determine the stack depth (e.g., for monitors acquired by JNI MonitorEnter).

Returns:int

the stack depth at which this monitor was acquired by the owning thread.

Exceptions
InvalidStackFrameException:
if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
See Also
ThreadReference#ownedMonitorsAndFrames
threadback to summary
public ThreadReference thread()

Returns a ThreadReference object for the thread that owns the monitor.

Returns:ThreadReference

a ThreadReference object for the thread that owns the monitor.

Exceptions
InvalidStackFrameException:
if the associated stack frame has become invalid. Once the frame's thread is resumed, the stack frame is no longer valid.
See Also
ThreadReference#frame