| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile boolean | |
| private List | |
| private ThreadReferenceImpl. | |
| pack-priv static final int | |
| pack-priv static final int | |
| private int | |
| private ThreadGroupReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public ObjectReference | currentContendedMonitor()
Implements com. Returns an |
| protected String | |
| public void | forceEarlyReturn(Value returnValue)
Implements com. Force a method to return before it reaches a return statement. |
| public StackFrame | frame(int index)
Implements com. Returns the |
| public int | frameCount()
Implements com. Returns the number of stack frames in the thread's current call stack. |
| public List | frames()
Implements com. Returns a List containing each |
| public List | frames(int start, int length)
Implements com. Returns a List containing a range of |
| public void | interrupt()
Implements com. Interrupts this thread unless the thread has been suspended by the debugger. |
| public boolean | isAtBreakpoint()
Implements com. Determines whether the thread is suspended at a breakpoint. |
| private boolean | isSubrange(ThreadReferenceImpl.
Is the requested subrange within what has been retrieved? |
| public boolean | isSuspended()
Implements com. Determines whether the thread has been suspended by the the debugger. |
| public boolean | isVirtual()
Overrides default com. Returns |
| private JDWP. | |
| public String | name()
Implements com. Note that we only cache the name string while the entire VM is suspended because the name can change via Thread.setName arbitrarily while this thread is running. |
| protected ObjectReferenceImpl. | |
| public List | ownedMonitors()
Implements com. Returns a List containing an |
| public List | ownedMonitorsAndFrames()
Implements com. Returns a List containing a |
| public void | |
| private synchronized List | privateFrames(int start, int length)
Private version of frames() allows "-1" to specify all remaining frames. |
| private void | processThreadAction(ThreadAction action)
Propagate the thread state change information to registered listeners. |
| private void | |
| public void | |
| pack-priv PacketStream | |
| public int | |
| public void | stop(ObjectReference throwable)
Implements com. Stops this thread with an asynchronous exception. |
| public void | |
| public int | suspendCount()
Implements com. Returns the number of pending suspends for this thread. |
| public ThreadGroupReference | threadGroup()
Implements com. Returns this thread's thread group. |
| public String | toString()
Overrides com. Implements com. Returns a String describing this mirror |
| pack-priv byte | |
| public boolean | vmNotSuspended(VMAction action)
Overrides com. Implements com.
|
| isVirtual | back to summary |
|---|---|
| private volatile boolean isVirtual | |
| isVirtualCached | back to summary |
|---|---|
| private volatile boolean isVirtualCached | |
| listeners | back to summary |
|---|---|
| private List<WeakReference<ThreadListener>> listeners | |
| localCache | back to summary |
|---|---|
| private ThreadReferenceImpl. | |
| SUSPEND_STATUS_BREAK | back to summary |
|---|---|
| pack-priv static final int SUSPEND_STATUS_BREAK | |
| SUSPEND_STATUS_SUSPENDED | back to summary |
|---|---|
| pack-priv static final int SUSPEND_STATUS_SUSPENDED | |
| suspendedZombieCount | back to summary |
|---|---|
| private int suspendedZombieCount | |
| threadGroup | back to summary |
|---|---|
| private ThreadGroupReference threadGroup | |
| ThreadReferenceImpl | back to summary |
|---|---|
| pack-priv ThreadReferenceImpl(VirtualMachine aVm, long aRef) | |
| addListener | back to summary |
|---|---|
| pack-priv void addListener(ThreadListener listener) | |
| currentContendedMonitor | back to summary |
|---|---|
| public ObjectReference currentContendedMonitor() throws IncompatibleThreadStateException Implements com. Doc from com. Returns an
Not all target virtual machines support this operation.
Use
| |
| description | back to summary |
|---|---|
| protected String description() Overrides com. | |
| forceEarlyReturn | back to summary |
|---|---|
| public void forceEarlyReturn(Value returnValue) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException Implements com. Doc from com. Force a method to return before it reaches a return statement. The method which will return early is referred to as the called method. The called method is the current method (as defined by the Frames section in the Java Virtual Machine Specification) for the specified thread at the time this method is called. The thread must be suspended. The return occurs when execution of Java programming language code is resumed on this thread. Between the call to this method and resumption of thread execution, the state of the stack is undefined. This method may be used to force a return from the current frame of a virtual thread when it is suspended at an event. An implementation may support forcing a return from the current frame of a suspended virtual thread in other cases. No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note this can cause inconsistent states in the application. A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note this does not apply to native locks or java.util.concurrent.locks locks. Events, such as MethodExit, are generated as they would be in a normal return. The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.
The
Not all target virtual machines support this operation.
Use
| |
| frame | back to summary |
|---|---|
| public StackFrame frame(int index) throws IncompatibleThreadStateException Implements com. Doc from com. Returns the
| |
| frameCount | back to summary |
|---|---|
| public int frameCount() throws IncompatibleThreadStateException Implements com. Doc from com. Returns the number of stack frames in the thread's current call stack. The thread must be suspended (normally through an interruption to the VM) to get this information, and it is only valid until the thread is resumed again.
| |
| frames | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a List containing each
| |
| frames | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a List containing a range of
| |
| interrupt | back to summary |
|---|---|
| public void interrupt() Implements com. Doc from com. Interrupts this thread unless the thread has been suspended by the debugger. | |
| isAtBreakpoint | back to summary |
|---|---|
| public boolean isAtBreakpoint() Implements com. Doc from com. Determines whether the thread is suspended at a breakpoint. | |
| isSubrange | back to summary |
|---|---|
| private boolean isSubrange(ThreadReferenceImpl. Is the requested subrange within what has been retrieved? local is known to be non-null. Should only be called from a sync method. | |
| isSuspended | back to summary |
|---|---|
| public boolean isSuspended() Implements com. Doc from com. Determines whether the thread has been suspended by the the debugger. | |
| isVirtual | back to summary |
|---|---|
| public boolean isVirtual() Overrides default com. Doc from com. Returns
| |
| jdwpStatus | back to summary |
|---|---|
| private JDWP. | |
| name | back to summary |
|---|---|
| public String name() Implements com. Note that we only cache the name string while the entire VM is suspended because the name can change via Thread.setName arbitrarily while this thread is running. | |
| newCache | back to summary |
|---|---|
| protected ObjectReferenceImpl. | |
| ownedMonitors | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a List containing an
Not all target virtual machines support this operation.
Use
| |
| ownedMonitorsAndFrames | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a List containing a
Not all target virtual machines support this operation.
Use
| |
| popFrames | back to summary |
|---|---|
| public void popFrames(StackFrame frame) throws IncompatibleThreadStateException Implements com. Doc from com. Pop stack frames.
All frames up to and including the
After this operation, this thread will be
suspended at the invoke instruction of the target method
that created
The operand stack is restored, however, any changes
to the arguments that occurred in the called method, remain.
For example, if the method
void foo(int x) {
System.out.println("Foo: " + x);
x = 4;
System.out.println("pop here");
}
was called with foo(7) and foo
is popped at the second println and resumed,
it will print: Foo: 4.
Locks acquired by a popped frame are released when it is popped. This applies to synchronized methods that are popped, and to any synchronized blocks within them. Finally blocks are not executed. No aspect of state, other than this thread's execution point and locks, is affected by this call. Specifically, the values of fields are unchanged, as are external resources such as I/O streams. Additionally, the target program might be placed in a state that is impossible with normal program flow; for example, order of lock acquisition might be perturbed. Thus the target program may proceed differently than the user would expect. This thread must be suspended.
All This method may be used to pop frames of a virtual thread when it is suspended at an event. An implementation may support popping the frames of a suspended virtual thread in other cases. No events are generated by this method. None of the frames through and including the frame for the caller of frame may be native.
Not all target virtual machines support this operation.
Use
| |
| privateFrames | back to summary |
|---|---|
| private synchronized List Private version of frames() allows "-1" to specify all remaining frames. | |
| processThreadAction | back to summary |
|---|---|
| private void processThreadAction(ThreadAction action) Propagate the thread state change information to registered listeners. Must be entered while synchronized on vm.state() | |
| resetLocalCache | back to summary |
|---|---|
| private void resetLocalCache() | |
| resume | back to summary |
|---|---|
| public void resume() Implements com. Doc from com. Resumes this thread. If this thread was not previously suspended
through Note the normal way to resume from an event related suspension is
via | |
| sendResumingCommand | back to summary |
|---|---|
| pack-priv PacketStream sendResumingCommand(CommandSender sender) | |
| status | back to summary |
|---|---|
| public int status() Implements com. Doc from com. Returns the thread's status. If the thread is not suspended the
thread's current status is returned. If the thread is suspended, the
thread's status before the suspension is returned (or
| |
| stop | back to summary |
|---|---|
| public void stop(ObjectReference throwable) throws InvalidTypeException Implements com. Doc from com. Stops this thread with an asynchronous exception.
A debugger thread in the target VM will stop this thread
with the given This method may be used to send an asynchronous exception to a virtual thread when it is suspended at an event. An implementation may support sending an asynchronous exception to a suspended virtual thread in other cases.
| |
| suspend | back to summary |
|---|---|
| public void suspend() Implements com. Doc from com. Suspends this thread. The thread can be resumed through
Suspends of both the virtual machine and individual threads are
counted. Before a thread will run again, it must be resumed
(through Suspending single threads with this method is inherently deadlock-prone. If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again). The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above. | |
| suspendCount | back to summary |
|---|---|
| public int suspendCount() Implements com. Doc from com. Returns the number of pending suspends for this thread. See
| |
| threadGroup | back to summary |
|---|---|
| public ThreadGroupReference threadGroup() Implements com. Doc from com. Returns this thread's thread group. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Implements com. Doc from com. Returns a String describing this mirror | |
| typeValueKey | back to summary |
|---|---|
| pack-priv byte typeValueKey() Overrides com. | |
| vmNotSuspended | back to summary |
|---|---|
| public boolean vmNotSuspended(VMAction action) Overrides com. Implements com. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String |
| Access | Constructor and Description |
|---|---|
| private |
| name | back to summary |
|---|---|
| pack-priv String name | |
| Cache | back to summary |
|---|---|
| private Cache() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv ObjectReference | |
| pack-priv int | |
| pack-priv List | |
| pack-priv int | |
| pack-priv int | |
| pack-priv List | |
| pack-priv List | |
| pack-priv JDWP. | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| private |
| contendedMonitor | back to summary |
|---|---|
| pack-priv ObjectReference contendedMonitor | |
| frameCount | back to summary |
|---|---|
| pack-priv int frameCount | |
| frames | back to summary |
|---|---|
| pack-priv List<StackFrame> frames | |
| framesLength | back to summary |
|---|---|
| pack-priv int framesLength | |
| framesStart | back to summary |
|---|---|
| pack-priv int framesStart | |
| ownedMonitors | back to summary |
|---|---|
| pack-priv List<ObjectReference> ownedMonitors | |
| ownedMonitorsInfo | back to summary |
|---|---|
| pack-priv List<MonitorInfo> ownedMonitorsInfo | |
| status | back to summary |
|---|---|
| pack-priv JDWP. | |
| triedCurrentContended | back to summary |
|---|---|
| pack-priv boolean triedCurrentContended | |
| LocalCache | back to summary |
|---|---|
| private LocalCache() | |