< prev index next >

src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java

Print this page

437      * state of the stack is undefined.
438      * <p>
439      * This method may be used to force a return from the current frame
440      * of a virtual thread when it is suspended at an event.
441      * An implementation may support forcing a return from the current frame
442      * of a suspended virtual thread in other cases.
443      * <p>
444      * No further instructions are executed in the called
445      * method. Specifically, finally blocks are not executed. Note:
446      * this can cause inconsistent states in the application.
447      * <p>
448      * A lock acquired by calling the called method (if it is a
449      * synchronized method) and locks acquired by entering
450      * synchronized blocks within the called method are
451      * released. Note: this does not apply to native locks or
452      * java.util.concurrent.locks locks.
453      * <p>
454      * Events, such as MethodExit, are generated as they would be in
455      * a normal return.
456      * <p>
457      * The called method must be a non-native Java programming
458      * language method. Forcing return on a thread with only one
459      * frame on the stack causes the thread to exit when resumed.

460      * <p>
461      * The <code>value</code> argument is the value that the
462      * method is to return.
463      * If the return type of the method is void, then value must
464      * be a  {@link VoidValue VoidValue}.
465      * Object values must be assignment compatible with the method return type
466      * (This implies that the method return type must be loaded through the
467      * enclosing class's class loader). Primitive values must be
468      * either assignment compatible with the method return type or must be
469      * convertible to the variable type without loss of information.
470      * See JLS section 5.2 for more information on assignment
471      * compatibility.
472      * <p>
473      * Not all target virtual machines support this operation.
474      * Use {@link VirtualMachine#canForceEarlyReturn()}
475      * to determine if the operation is supported.
476      *
477      * @param value the value the method is to return.
478      *
479      * @throws java.lang.UnsupportedOperationException if

437      * state of the stack is undefined.
438      * <p>
439      * This method may be used to force a return from the current frame
440      * of a virtual thread when it is suspended at an event.
441      * An implementation may support forcing a return from the current frame
442      * of a suspended virtual thread in other cases.
443      * <p>
444      * No further instructions are executed in the called
445      * method. Specifically, finally blocks are not executed. Note:
446      * this can cause inconsistent states in the application.
447      * <p>
448      * A lock acquired by calling the called method (if it is a
449      * synchronized method) and locks acquired by entering
450      * synchronized blocks within the called method are
451      * released. Note: this does not apply to native locks or
452      * java.util.concurrent.locks locks.
453      * <p>
454      * Events, such as MethodExit, are generated as they would be in
455      * a normal return.
456      * <p>
457      * The called method must not be a native method or the constructor of
458      * a {@linkplain Class#isValue() value class}. Forcing early return
459      * on a thread with only one frame on the stack causes the thread to
460      * exit when resumed.
461      * <p>
462      * The <code>value</code> argument is the value that the
463      * method is to return.
464      * If the return type of the method is void, then value must
465      * be a  {@link VoidValue VoidValue}.
466      * Object values must be assignment compatible with the method return type
467      * (This implies that the method return type must be loaded through the
468      * enclosing class's class loader). Primitive values must be
469      * either assignment compatible with the method return type or must be
470      * convertible to the variable type without loss of information.
471      * See JLS section 5.2 for more information on assignment
472      * compatibility.
473      * <p>
474      * Not all target virtual machines support this operation.
475      * Use {@link VirtualMachine#canForceEarlyReturn()}
476      * to determine if the operation is supported.
477      *
478      * @param value the value the method is to return.
479      *
480      * @throws java.lang.UnsupportedOperationException if
< prev index next >