java.lang.Object
jdk.jshell.execution.StreamingExecutionControl
jdk.jshell.execution.JdiExecutionControl
- 所有已实现的接口:
AutoCloseable,ExecutionControl
public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl
ExecutionControl 的抽象 JDI 实现。
- 自从:
- 9
-
内部类总结
在接口 jdk.jshell.spi.ExecutionControl 中声明的嵌套类/接口
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述void重新定义指定的类。protected ReferenceTypereferenceType(VirtualMachine vm, String name) 返回指定类名对应的 JDIReferenceType。protected abstract VirtualMachinevm()返回 JDIVirtualMachine实例。在类 jdk.jshell.execution.StreamingExecutionControl 中声明的方法
addToClasspath, close, extensionCommand, invoke, load, stop, varValue在类 java.lang.Object 中声明的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait在接口 jdk.jshell.spi.ExecutionControl 中声明的方法
addToClasspath, close, extensionCommand, invoke, load, stop, varValue
-
构造方法详细信息
-
JdiExecutionControl
创建实例。- 参数:
out- 远程代理的输出in- 远程代理的输入
-
-
方法详情
-
vm
返回 JDIVirtualMachine实例。- 返回:
- 虚拟机
- 抛出:
ExecutionControl.EngineTerminationException- 如果 VM 死机/断开连接
-
redefine
public void redefine(ExecutionControl.ClassBytecodes [] cbcs) throws ExecutionControl.ClassInstallException , ExecutionControl.EngineTerminationException 重新定义指定的类。与在 JDI 和 JVMTI 中一样,“重新定义”是类的就地替换(保留类身份)——也就是说,不需要重新编译对类的现有引用。此实现使用 JDIVirtualMachine.redefineClasses(java.util.Map)。如果类的签名已更改(请参阅 JDI 规范),它将不成功。 JShell-core 旨在适应不成功的重定义。- 指定者:
redefine在接口ExecutionControl中- 参数:
cbcs- 要重新定义的类名和字节码- 抛出:
ExecutionControl.ClassInstallException- 重新定义类时发生异常,部分或全部未重新定义ExecutionControl.EngineTerminationException- 执行引擎已终止
-
referenceType
返回指定类名对应的 JDIReferenceType。- 参数:
vm-vm()返回的当前 JDIVirtualMachinename- 要查找的类名- 返回:
-
对应的
ReferenceType
-