- java.lang.Object
- 
- jdk.jshell.execution.DirectExecutionControl
 
- 
- すべての実装されたインタフェース:
- AutoCloseable,- ExecutionControl
 - 直系の既知のサブクラス:
- LocalExecutionControl,- RemoteExecutionControl
 
 public class DirectExecutionControl extends Object implements ExecutionControl 現在のプロセスで実行されるExecutionControl実装。Util.forwardExecutionControl(ExecutionControl, java.io.ObjectInput, java.io.ObjectOutput)を使用して直接、またはチャネルで使用できます。- 導入されたバージョン:
- 9
 
- 
- 
ネストされたクラスのサマリー- 
インタフェース jdk.jshell.spi.ExecutionControlで宣言されたネストされたクラス/インタフェースExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
 
- 
 - 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 DirectExecutionControl()デフォルトのクラス・ローディングを使用してインスタンスを作成します。DirectExecutionControl(LoaderDelegate loaderDelegate)指定されたデリゲートにローダー操作を委譲するインスタンスを作成します。
 - 
メソッドのサマリー修飾子と型 メソッド 説明 protected voidclassesRedefined(ExecutionControl.ClassBytecodes[] cbcs)クラスが再定義されたことを通知します。protected voidclientCodeEnter()ユーザー・コードへのエントリをマークします。protected voidclientCodeLeave()ユーザー・コードから出発します。protected Class<?>findClass(String name)指定されたバイナリ名を持つクラスを探します。protected Stringinvoke(Method doitMethod)パラメータを指定しない静的メソッド"doit-method"を呼び出します。voidstop()実行中の呼び出しを中断します。protected StringthrowConvertedInvocationException(Throwable cause)ユーザー・コードの受信例外をExecutionControl.ExecutionControlExceptionのサブ型のインスタンスに変換し、変換された例外をスローします。protected StringthrowConvertedOtherException(Throwable ex)エージェント・コード内の受信例外をExecutionControl.ExecutionControlExceptionのサブ型のインスタンスに変換し、変換された例外をスローします。protected static StringvalueString(Object value)Objectの値をExecutionControl.invoke(String, String)またはExecutionControl.varValue(String, String)からStringに変換します。- 
クラス java.lang.Objectで宣言されたメソッドclone、equals、finalize、getClass、hashCode、notify、notifyAll、toString、wait、wait、wait
 - 
インタフェース jdk.jshell.spi.ExecutionControlで宣言されたメソッドaddToClasspath, close, extensionCommand, invoke, load, redefine, varValue
 
- 
 
- 
- 
- 
コンストラクタの詳細- 
DirectExecutionControlpublic DirectExecutionControl(LoaderDelegate loaderDelegate) 指定されたデリゲートにローダー操作を委譲するインスタンスを作成します。- パラメータ:
- loaderDelegate- デリゲートがロード・クラスを処理
 
 - 
DirectExecutionControlpublic DirectExecutionControl() デフォルトのクラス・ローディングを使用してインスタンスを作成します。
 
- 
 - 
メソッドの詳細- 
classesRedefinedprotected void classesRedefined(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException クラスが再定義されたことを通知します。- パラメータ:
- cbcs- 再定義するクラス名とバイトコード
- 例外:
- ExecutionControl.NotImplementedException- 実装されていない場合
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
 
 - 
stoppublic void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException実行中の呼び出しを中断します。サポートされていません。 - 定義:
- インタフェースExecutionControl内のstop
- 例外:
- ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
- ExecutionControl.InternalException- 内部問題が発生しました
 
 - 
findClassprotected Class<?> findClass(String name) throws ClassNotFoundException 指定されたバイナリ名を持つクラスを探します。- パラメータ:
- name- クラスのバイナリ名
- 戻り値:
- クラス・オブジェクト
- 例外:
- ClassNotFoundException- クラスが見つからなかった場合
 
 - 
invokeprotected String invoke(Method doitMethod) throws Exception パラメータを指定しない静的メソッド"doit-method"を呼び出します。 このクラスのExecutionControl.invoke(java.lang.String, java.lang.String)はこれを呼び出して呼び出します。- パラメータ:
- doitMethod- 呼び出すメソッド
- 戻り値:
- 値またはnull
- 例外:
- Exception-- Method.invoke(Object, Object...)または任意の- ExecutionControl.ExecutionControlExceptionによってパススルーにスローされた例外。
 
 - 
valueStringprotected static String valueString(Object value) Objectの値をExecutionControl.invoke(String, String)またはExecutionControl.varValue(String, String)からStringに変換します。- パラメータ:
- value- 変換する値
- 戻り値:
- String表現
 
 - 
throwConvertedInvocationExceptionprotected String throwConvertedInvocationException(Throwable cause) throws ExecutionControl.RunException, ExecutionControl.InternalException ユーザー・コードの受信例外をExecutionControl.ExecutionControlExceptionのサブ型のインスタンスに変換し、変換された例外をスローします。- パラメータ:
- cause- 変換する例外
- 戻り値:
- いつも通りに戻ることはありません
- 例外:
- ExecutionControl.RunException- 通常の例外発生の場合
- ExecutionControl.InternalException- 内部問題
 
 - 
throwConvertedOtherExceptionprotected String throwConvertedOtherException(Throwable ex) throws ExecutionControl.RunException, ExecutionControl.InternalException エージェント・コード内の受信例外をExecutionControl.ExecutionControlExceptionのサブ型のインスタンスに変換し、変換された例外をスローします。- パラメータ:
- ex- 変換する例外
- 戻り値:
- いつも通りに戻ることはありません
- 例外:
- ExecutionControl.RunException- 通常の例外発生の場合
- ExecutionControl.InternalException- 内部問題
 
 - 
clientCodeEnterprotected void clientCodeEnter() throws ExecutionControl.InternalExceptionユーザー・コードへのエントリをマークします。- 例外:
- ExecutionControl.InternalException- 予期しない失敗事例で
 
 - 
clientCodeLeaveprotected void clientCodeLeave() throws ExecutionControl.InternalExceptionユーザー・コードから出発します。- 例外:
- ExecutionControl.InternalException- 予期しない失敗事例で
 
 
- 
 
-