クラスJdiDefaultExecutionControl
java.lang.Object
jdk.jshell.execution.StreamingExecutionControl
jdk.jshell.execution.JdiExecutionControl
jdk.jshell.execution.JdiDefaultExecutionControl
- すべての実装されたインタフェース:
AutoCloseable, ExecutionControl
public class JdiDefaultExecutionControl extends JdiExecutionControl
JShellコアがデフォルトで使用する
ExecutionControlの実装。 リモート・プロセスを起動 -- "リモート・エージェント"。 ソケットおよびJDIを介したリモート・エージェントへのインタフェース。 RemoteExecutionControlで動作するように設計されています。 - 導入されたバージョン:
- 9
-
ネストされたクラスのサマリー
ネストされたクラスインタフェースで宣言されたネストされたクラス/インタフェース ExecutionControl
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException修飾子と型インタフェース説明static final classクラス名とクラス・バイト・コードをバンドルします。static classクラス・インストール(ロードまたは再定義)で問題が発生しました。static class禁止されていない実行エンジンの終了が発生しました。static classすべてのExecutionControl例外の抽象ベース。static class内部問題が発生しました。static classコマンドは実装されていません。static class未解決の参照を含むDeclarationSnippetが検出されたことを示す例外。static class実行中のユーザー・コードに固有の例外の抽象ベース。static classstatic class「通常の」ユーザー例外が発生しました。 -
メソッドのサマリー
修飾子と型メソッド説明指定されたラッパー・クラスのメソッドをコールして、実行可能スニペットを起動します。voidstop()リモート変数を操作し、JDI経由で停止を送信することで、実行中のリモート呼出しを中断します。protected VirtualMachinevm()JDIVirtualMachineインスタンスを返します。クラスで宣言されたメソッド JdiExecutionControl
redefine, referenceType修飾子と型メソッド説明void指定されたクラスを再定義します。protected ReferenceTypereferenceType(VirtualMachine vm, String name) 指定されたクラス名に対応するJDIReferenceTypeを返します。クラスで宣言されたメソッド StreamingExecutionControl
addToClasspath, close, extensionCommand, load, varValue修飾子と型メソッド説明voidaddToClasspath(String path) 実行クラス・パスにパスを追加します。voidclose()実行エンジンを閉じます。extensionCommand(String command, Object arg) 非標準コマンド(新しいバージョンの標準コマンド)を実行します。voidload(ExecutionControl.ClassBytecodes[] cbcs) 新しいクラスをロードしようとします。変数の値を返します。クラスオブジェクトで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait修飾子と型メソッド説明protected Objectclone()このオブジェクトのコピーを作成して、返します。booleanこのオブジェクトと他のオブジェクトが等しいかどうかを示します。protected voidfinalize()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。最終決定は非推奨であり、将来のリリースで削除される可能性があります。final Class<?> getClass()このObjectの実行時クラスを返します。inthashCode()このオブジェクトに対するハッシュ・コード値を返します。final voidnotify()このオブジェクトのモニターで待機中のスレッドを1つ再開します。final voidこのオブジェクトのモニターで待機中のすべてのスレッドを再開します。toString()オブジェクトの文字列表現を返します。final voidwait()現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。final voidwait(long timeoutMillis) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。final voidwait(long timeoutMillis, int nanos) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
メソッドの詳細
-
invoke
public String invoke(String classname, String methodname) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException インタフェース:ExecutionControlからコピーされた説明指定されたラッパー・クラスのメソッドをコールして、実行可能スニペットを起動します。 メソッドには引数がなく、Stringを返す必要があります。- 定義:
- インタフェース
ExecutionControl内のinvoke - オーバーライド:
- クラス
StreamingExecutionControlのinvoke - パラメータ:
classname- メソッドを呼び出すべきクラスmethodname- 呼び出すメソッドの名前- 戻り値:
- 実行の結果。結果がない場合はnull
- スロー:
ExecutionControl.UserException- 呼び出しによってユーザー例外が発生しましたExecutionControl.ResolutionException- 呼び出しは、直接または間接的に未解決のスニペットを呼び出そうとしましたExecutionControl.StoppedException-invoke()がExecutionControl.stop()によって取り消された場合ExecutionControl.EngineTerminationException- 実行エンジンが終了しましたExecutionControl.InternalException- 内部問題が発生しましたExecutionControl.RunException
-
stop
public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalExceptionリモート変数を操作し、JDI経由で停止を送信することで、実行中のリモート呼出しを中断します。- スロー:
ExecutionControl.EngineTerminationException- 実行エンジンが終了しましたExecutionControl.InternalException- 内部問題が発生しました
-
vm
protected VirtualMachine vm() throws ExecutionControl.EngineTerminationExceptionクラス:JdiExecutionControlからコピーされた説明JDIVirtualMachineインスタンスを返します。- 定義:
- クラス
JdiExecutionControlのvm - 戻り値:
- 仮想マシン
- スロー:
ExecutionControl.EngineTerminationException- VMが停止/切断されている場合
-