Module jdk.jshell

Interface ExecutionControlProvider

All Known Implementing Classes:
FailOverExecutionControlProvider, JdiExecutionControlProvider, LocalExecutionControlProvider

public interface ExecutionControlProvider
The provider used by JShell to generate the execution engine needed to evaluate Snippets. Alternate execution engines can be created by implementing this interface, then configuring JShell with the provider or the providers name and parameter specifier.
  • Method Details

    • name

      String name()
      The unique name of this ExecutionControlProvider. The name must be a sequence of characters from the Basic Multilingual Plane which are Character.isJavaIdentifierPart(char).
      the ExecutionControlProvider's name
    • defaultParameters

      default Map<String,String> defaultParameters()
      Create and return the default parameter map for this ExecutionControlProvider. The map can optionally be modified; Modified or unmodified it can be passed to generate(jdk.jshell.spi.ExecutionEnv, java.util.Map).
      the default parameter map
    • generate

      ExecutionControl generate(ExecutionEnv env, Map<String,String> parameters) throws Throwable
      Create and return the ExecutionControl instance.
      env - the execution environment, provided by JShell
      parameters - the default or modified parameter map.
      the execution engine
      Throwable - an exception that occurred attempting to create the execution engine.