- 
- すべてのスーパー・インタフェース:
- AutoCloseable
 - 既知のすべての実装クラス:
- DirectExecutionControl,- JdiDefaultExecutionControl,- JdiExecutionControl,- LocalExecutionControl,- RemoteExecutionControl,- StreamingExecutionControl
 
 public interface ExecutionControl extends AutoCloseable このインタフェースは、プラガブルJShell実行エンジンを実装するために提供する必要がある機能を指定します。このサービス・プロバイダ・インタフェースの対象読者は、JShell APIをサポートする独自のバージョンの実行エンジンを実装したいエンジニアです。 スニペットは'ラッパー・クラス'にラップされたコードにコンパイルされます。 実行エンジンはコアJShell実装で使用され、読み込み可能なスニペットの場合はスニペットが実行されます。 このインタフェースで定義されたメソッドは、コアのJShell実装によってのみ呼び出されます。 - 導入されたバージョン:
- 9
 
- 
- 
ネストされたクラスのサマリーネストされたクラス 修飾子と型 インタフェース 説明 static classExecutionControl.ClassBytecodesクラスのバイトコードでクラス名をバンドルします。static classExecutionControl.ClassInstallExceptionクラスinstall (ロードまたは再定義)に問題が発生しました。static classExecutionControl.EngineTerminationException禁止された実行エンジン終了が発生しました。static classExecutionControl.ExecutionControlExceptionすべてのExecutionControl例外の抽象基盤。static classExecutionControl.InternalException内部的な問題が発生しました。static classExecutionControl.NotImplementedExceptionこのコマンドは実装されていません。static classExecutionControl.ResolutionException未解決の参照を含むDeclarationSnippetが検出されたことを示す例外です。static classExecutionControl.RunException実行中のユーザー・コードに固有の例外の抽象基盤。static classExecutionControl.StoppedExceptioninvoke(java.lang.String, java.lang.String)(または理論的にはvarValue(java.lang.String, java.lang.String))がstop()によって中断されたことを示す例外。static classExecutionControl.UserException'normal'ユーザー例外が発生しました。
 - 
メソッドのサマリー修飾子と型 メソッド 説明 voidaddToClasspath(String path)実行クラスパスにパスを追加します。voidclose()この実行エンジンをシャットダウンします。ObjectextensionCommand(String command, Object arg)非標準コマンド(新しいバージョンの標準コマンド)を実行します。static ExecutionControlgenerate(ExecutionEnv env, String spec)プロバイダを検索し、ExecutionControlインスタンスを作成して返します。static ExecutionControlgenerate(ExecutionEnv env, String name, Map<String,String> parameters)プロバイダを検索し、ExecutionControlインスタンスを作成して返します。Stringinvoke(String className, String methodName)指定されたラッパー・クラスのメソッドを呼び出すことにより、実行可能スニペットを呼び出します。voidload(ExecutionControl.ClassBytecodes[] cbcs)新しいクラスをロードしようとします。voidredefine(ExecutionControl.ClassBytecodes[] cbcs)以前にロードされたクラスを再定義しようとします。voidstop()実行中の呼び出しを中断します。StringvarValue(String className, String varName)変数の値を返します。
 
- 
- 
- 
メソッドの詳細- 
loadvoid load(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException 新しいクラスをロードしようとします。- パラメータ:
- cbcs- ロードするクラス名とバイトコード
- 例外:
- ExecutionControl.ClassInstallException- クラスのロード中に例外が発生しました。一部またはすべてがロードされませんでした
- ExecutionControl.NotImplementedException- 実装されていない場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
 
 - 
redefinevoid redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException 以前にロードされたクラスを再定義しようとします。- パラメータ:
- cbcs- 再定義するクラス名とバイトコード
- 例外:
- ExecutionControl.ClassInstallException- クラスを再定義する際に例外が発生しました。一部またはすべてが再定義されませんでした
- ExecutionControl.NotImplementedException- 実装されていない場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
 
 - 
invokeString invoke(String className, String methodName) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException 指定されたラッパー・クラスのメソッドを呼び出すことにより、実行可能スニペットを呼び出します。 このメソッドは引数を持たず、Stringを返さなければなりません。- パラメータ:
- className- メソッドを呼び出すべきクラス
- methodName- 呼び出すメソッドの名前
- 戻り値:
- 実行の結果。結果がない場合はnull
- 例外:
- ExecutionControl.UserException- 呼び出しによってユーザー例外が発生しました
- ExecutionControl.ResolutionException- 呼び出しは、直接または間接的に未解決のスニペットを呼び出そうとしました
- ExecutionControl.StoppedException-- invoke()が- stop()によって取り消された場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.InternalException- 内部問題が発生しました
- ExecutionControl.RunException
 
 - 
varValueString varValue(String className, String varName) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException 変数の値を返します。- パラメータ:
- className- 変数のラッパー・クラスの名前
- varName- 変数の名前
- 戻り値:
- 変数の値
- 例外:
- ExecutionControl.UserException- 値の書式設定によってユーザー例外が発生しました
- ExecutionControl.ResolutionException- 値をフォーマットすると、未解決のスニペットを直接的または間接的に呼び出そうとしました
- ExecutionControl.StoppedException- 値の書式設定が- stop()によって取消された場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.InternalException- 内部問題が発生しました
- ExecutionControl.RunException
 
 - 
addToClasspathvoid addToClasspath(String path) throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException 実行クラスパスにパスを追加します。- パラメータ:
- path- 追加するパス
- 例外:
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.InternalException- 内部問題が発生しました
 
 - 
stopvoid stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException 実行中の呼び出しを中断します。- 例外:
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.InternalException- 内部問題が発生しました
 
 - 
extensionCommandObject extensionCommand(String command, Object arg) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException 非標準コマンド(新しいバージョンの標準コマンド)を実行します。- パラメータ:
- command- 非標準コマンド
- arg- コマンドの引数
- 戻り値:
- コマンドは値を返します
- 例外:
- ExecutionControl.UserException- コマンドはユーザー例外を発生させました
- ExecutionControl.ResolutionException- コマンドは、直接または間接的に未解決のスニペットを呼び出そうとしました
- ExecutionControl.StoppedException- コマンドが- stop()によって取り消された場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.NotImplementedException- 実装されていない場合
- ExecutionControl.InternalException- 内部問題が発生しました
- ExecutionControl.RunException
 
 - 
closevoid close() この実行エンジンをシャットダウンします。 実装では、この実行エンジンが保持するすべてのリソースを解放する必要があります。このインタフェース上のメソッドへの呼び出しは、終了後に行う必要がありません。 - 定義:
- close、インタフェース:- AutoCloseable
 
 - 
generatestatic ExecutionControl generate(ExecutionEnv env, String name, Map<String,String> parameters) throws Throwable プロバイダを検索し、ExecutionControlインスタンスを作成して返します。- パラメータ:
- env- 実行環境(JShell提供)
- name- プロバイダ名
- parameters- パラメータ・マップ。
- 戻り値:
- 実行エンジン
- 例外:
- Throwable- 実行エンジンを検出または作成しようとしたときに発生した例外です。
- IllegalArgumentException- ExecutionControlProviderに指定された- nameと- parametersがない場合。
 
 - 
generatestatic ExecutionControl generate(ExecutionEnv env, String spec) throws Throwable プロバイダを検索し、ExecutionControlインスタンスを作成して返します。- パラメータ:
- env- 実行環境(JShell提供)
- spec- この「パッケージのドキュメント」のドキュメントに記載されている- ExecutionControl仕様。
- 戻り値:
- 実行エンジン
- 例外:
- Throwable- 実行エンジンを検出または作成しようとしたときに発生した例外です。
- IllegalArgumentException- ExecutionControlProviderに指定された- nameと- parametersがない場合。
- IllegalArgumentException-- specが不正な形式の場合
 
 
- 
 
-