java.lang.Object
jdk.jshell.execution.DirectExecutionControl
- All Implemented Interfaces:
AutoCloseable
,ExecutionControl
- Direct Known Subclasses:
LocalExecutionControl
,RemoteExecutionControl
An
ExecutionControl
implementation that runs in the current process.
May be used directly, or over a channel with
Util.forwardExecutionControl(ExecutionControl, java.io.ObjectInput, java.io.ObjectOutput)
.- Since:
- 9
-
Nested Class Summary
Nested classes/interfaces declared in interface jdk.jshell.spi.ExecutionControl
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance using the default class loading.DirectExecutionControl
(LoaderDelegate loaderDelegate) Creates an instance, delegating loader operations to the specified delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToClasspath
(String cp) Adds the path to the execution class path.protected void
Notify that classes have been redefined.protected void
Marks entry into user code.protected void
Marks departure from user code.void
close()
Shuts down this execution engine.extensionCommand
(String command, Object arg) Run a non-standard command (or a standard command from a newer version).protected Class
<?> Finds the class with the specified binary name.protected String
Invoke the specified "doit-method", a static method with no parameters.Invokes an executable Snippet by calling a method on the specified wrapper class.void
load
(ExecutionControl.ClassBytecodes[] cbcs) Attempts to load new classes.void
Attempts to redefine previously loaded classes.void
stop()
Interrupts a running invoke.protected String
Converts incoming exceptions in user code into instances of subtypes ofExecutionControl.ExecutionControlException
and throws the converted exception.protected String
Converts incoming exceptions in agent code into instances of subtypes ofExecutionControl.ExecutionControlException
and throws the converted exception.protected static String
valueString
(Object value) Converts theObject
value fromExecutionControl.invoke(String, String)
orExecutionControl.varValue(String, String)
toString
.Returns the value of a variable.