AutoCloseable
, ExecutionControl
JdiDefaultExecutionControl
public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl
ExecutionControl
.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Modifier | Constructor | Description |
---|---|---|
protected |
Create an instance. |
Modifier and Type | Method | Description |
---|---|---|
void |
redefine |
Redefine the specified classes. |
protected ReferenceType |
referenceType |
Returns the JDI ReferenceType corresponding to the specified class name. |
protected abstract VirtualMachine |
vm() |
Returns the JDI VirtualMachine instance. |
addToClasspath, close, extensionCommand, invoke, load, stop, varValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToClasspath, close, extensionCommand, invoke, load, stop, varValue
protected JdiExecutionControl(ObjectOutput out, ObjectInput in)
out
- the output from the remote agentin
- the input to the remote agentprotected abstract VirtualMachine vm() throws ExecutionControl.EngineTerminationException
VirtualMachine
instance.ExecutionControl.EngineTerminationException
- if the VM is dead/disconnectedpublic void redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException
VirtualMachine.redefineClasses(java.util.Map)
. It will be unsuccessful if the signature of the class has changed (see the JDI spec). The JShell-core is designed to adapt to unsuccessful redefine.redefine
in interface ExecutionControl
cbcs
- the class name and bytecodes to redefineExecutionControl.ClassInstallException
- exception occurred redefining the classes, some or all were not redefinedExecutionControl.EngineTerminationException
- the execution engine has terminatedprotected ReferenceType referenceType(VirtualMachine vm, String name)
ReferenceType
corresponding to the specified class name.vm
- the current JDI VirtualMachine
as returned by vm()
name
- the class name to look-upReferenceType
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.jshell/jdk/jshell/execution/JdiExecutionControl.html