java.lang.Object
jdk.jshell.execution.StreamingExecutionControl
- 所有已实现的接口:
AutoCloseable,ExecutionControl
- 已知子类:
JdiExecutionControl
ExecutionControl 执行引擎 SPI 的实现,它将请求流式传输到执行发生的远程代理。
- 自从:
- 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 -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述voidaddToClasspath(String path) 将路径添加到执行类路径。voidclose()关闭执行引擎。extensionCommand(String command, Object arg) 运行非标准命令(或来自较新版本的标准命令)。通过调用指定包装器类上的方法来调用可执行代码段。voidload(ExecutionControl.ClassBytecodes[] cbcs) 尝试加载新类。void尝试重新定义以前加载的类。voidstop()中断正在运行的调用。返回变量的值。
-
构造方法详细信息
-
StreamingExecutionControl
创建实例。- 参数:
out- 命令的输出in- 命令响应的输入
-
-
方法详情
-
load
public void load(ExecutionControl.ClassBytecodes [] cbcs) throws ExecutionControl.ClassInstallException , ExecutionControl.NotImplementedException , ExecutionControl.EngineTerminationException 从接口ExecutionControl复制的描述尝试加载新类。- 指定者:
load在接口ExecutionControl中- 参数:
cbcs- 要加载的类名和字节码- 抛出:
ExecutionControl.ClassInstallException- 加载类时发生异常,部分或全部未加载ExecutionControl.NotImplementedException- 如果没有实现ExecutionControl.EngineTerminationException- 执行引擎已终止
-
redefine
public void redefine(ExecutionControl.ClassBytecodes [] cbcs) throws ExecutionControl.ClassInstallException , ExecutionControl.NotImplementedException , ExecutionControl.EngineTerminationException 从接口ExecutionControl复制的描述尝试重新定义以前加载的类。- 指定者:
redefine在接口ExecutionControl中- 参数:
cbcs- 要重新定义的类名和字节码- 抛出:
ExecutionControl.ClassInstallException- 重新定义类时发生异常,部分或全部未重新定义ExecutionControl.NotImplementedException- 如果没有实现ExecutionControl.EngineTerminationException- 执行引擎已终止
-
invoke
public String invoke(String classname, String methodname) throws ExecutionControl.RunException , ExecutionControl.EngineTerminationException , ExecutionControl.InternalException 从接口ExecutionControl复制的描述通过调用指定包装器类上的方法来调用可执行代码段。该方法必须没有参数并返回字符串。- 指定者:
invoke在接口ExecutionControl中- 参数:
classname- 应调用其方法的类methodname- 要调用的方法的名称- 返回:
- 执行的结果,如果没有结果则为 null
- 抛出:
ExecutionControl.UserException- 调用引发了用户异常ExecutionControl.ResolutionException- 调用试图直接或间接调用未解析的片段ExecutionControl.StoppedException- 如果invoke()被ExecutionControl.stop()取消ExecutionControl.EngineTerminationException- 执行引擎已终止ExecutionControl.InternalException- 发生内部问题ExecutionControl.RunException
-
varValue
public String varValue(String classname, String varname) throws ExecutionControl.RunException , ExecutionControl.EngineTerminationException , ExecutionControl.InternalException 从接口ExecutionControl复制的描述返回变量的值。- 指定者:
varValue在接口ExecutionControl中- 参数:
classname- 变量的包装类名称varname- 变量的名称- 返回:
- 变量的值
- 抛出:
ExecutionControl.UserException- 格式化值引发了用户异常ExecutionControl.ResolutionException- 格式化试图直接或间接调用未解析片段的值ExecutionControl.StoppedException- 如果格式化值被ExecutionControl.stop()取消ExecutionControl.EngineTerminationException- 执行引擎已终止ExecutionControl.InternalException- 发生内部问题ExecutionControl.RunException
-
addToClasspath
public void addToClasspath(String path) throws ExecutionControl.EngineTerminationException , ExecutionControl.InternalException 从接口ExecutionControl复制的描述将路径添加到执行类路径。- 指定者:
addToClasspath在接口ExecutionControl中- 参数:
path- 添加的路径- 抛出:
ExecutionControl.EngineTerminationException- 执行引擎已终止ExecutionControl.InternalException- 发生内部问题
-
stop
public void stop() throws ExecutionControl.EngineTerminationException , ExecutionControl.InternalException从接口ExecutionControl复制的描述中断正在运行的调用。- 指定者:
stop在接口ExecutionControl中- 抛出:
ExecutionControl.EngineTerminationException- 执行引擎已终止ExecutionControl.InternalException- 发生内部问题
-
extensionCommand
public Object extensionCommand(String command, Object arg) throws ExecutionControl.RunException , ExecutionControl.EngineTerminationException , ExecutionControl.InternalException 从接口ExecutionControl复制的描述运行非标准命令(或来自较新版本的标准命令)。- 指定者:
extensionCommand在接口ExecutionControl中- 参数:
command- 非标准命令arg- 命令参数- 返回:
- 命令返回值
- 抛出:
ExecutionControl.UserException- 命令引发了用户异常ExecutionControl.ResolutionException- 该命令试图直接或间接调用未解析的片段ExecutionControl.StoppedException- 如果命令被ExecutionControl.stop()取消ExecutionControl.EngineTerminationException- 执行引擎已终止ExecutionControl.NotImplementedException- 如果没有实现ExecutionControl.InternalException- 发生内部问题ExecutionControl.RunException
-
close
public void close()关闭执行引擎。向远程代理发送退出命令。- 指定者:
close在接口AutoCloseable中- 指定者:
close在接口ExecutionControl中
-