jdk.jshell.spi (Java SE 15 & JDK 15) (original) (raw)

Defines the Service Provider Interface for pluggable JShell execution engines. The JShell core tracks and compiles Snippets then sends them (represented in a wrapper class) to the execution engine for loading, and in the case of executable Snippets, execution. The JShell implementation includes a default execution engine (currently a remote process which is JDI controlled). By implementing theExecutionControl interface and its generating class, an implementation of the ExecutionControlProvider interface, and installing it withJShell.Builder.executionEngine(String) other execution engines can be used. Where the passed String is anExecutionControl spec.

The ExecutionControl spec is the ExecutionControlProvider name optionally followed by a parameter specification. The syntax of the spec is:

spec := name : params | name name := identifier params := param , params | param | param := identifier ( value )

Where 'name' is the ExecutionControlProvider name. Where 'param' is a Map key fromExecutionControlProvider.defaultParameters() and the parenthesized value; See, for example,JdiExecutionControlProvider. Where 'identifier' is a sequence ofJava identifier part characters from the Basic Multilingual Plane.

For example:

Since:

9

See Also:

for execution implementation support