- 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)パラメータのないstaticメソッドである、指定された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で宣言されたメソッド。オブジェクト
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
インタフェースjdk.jshell.spiで宣言されたメソッド。ExecutionControl
addToClasspath, close, extensionCommand, invoke, load, redefine, varValue
-
-
-
-
コンストラクタの詳細
-
DirectExecutionControl
public DirectExecutionControl(LoaderDelegate loaderDelegate)
指定された委任にローダー操作を委任して、インスタンスを作成します。- パラメータ:
loaderDelegate- ロード・クラスを処理する委任
-
DirectExecutionControl
public DirectExecutionControl()
デフォルトのクラス・ロードを使用してインスタンスを作成します。
-
-
メソッドの詳細
-
classesRedefined
protected void classesRedefined(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException
クラスが再定義されたことを通知します。- パラメータ:
cbcs- 再定義するクラス名およびバイトコード- 例外:
ExecutionControl.NotImplementedException- 実装されていない場合ExecutionControl.EngineTerminationException- 実行エンジンが終了しました
-
stop
public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException実行中の呼出しを中断します。サポートされていません。
- 定義:
- インタフェース
ExecutionControlのstop - 例外:
ExecutionControl.EngineTerminationException- 実行エンジンが終了しましたExecutionControl.InternalException- 内部問題が発生しました
-
findClass
protected Class<?> findClass(String name) throws ClassNotFoundException
指定されたバイナリ名を持つクラスを検索します。- パラメータ:
name- クラスのバイナリ名- 戻り値:
- クラス・オブジェクト
- 例外:
ClassNotFoundException- クラスが見つからない場合
-
invoke
protected String invoke(Method doitMethod) throws Exception
パラメータのないstaticメソッドである、指定されたdoit-methodを起動します。 このクラスのExecutionControl.invoke(java.lang.String, java.lang.String)は、これを呼び出して呼び出します。- パラメータ:
doitMethod- 起動するメソッド- 戻り値:
- 値またはnull
- 例外:
Exception-Method.invoke(Object, Object...)またはパススルーするExecutionControl.ExecutionControlExceptionによってスローされる例外。
-
valueString
protected static String valueString(Object value)
Object値をExecutionControl.invoke(String, String)またはExecutionControl.varValue(String, String)からStringに変換します。- パラメータ:
value- 変換する値- 戻り値:
String表現
-
throwConvertedInvocationException
protected String throwConvertedInvocationException(Throwable cause) throws ExecutionControl.RunException, ExecutionControl.InternalException
ユーザー・コードの受信例外をExecutionControl.ExecutionControlExceptionのサブタイプのインスタンスに変換し、変換された例外をスローします。- パラメータ:
cause- 変換する例外- 戻り値:
- 常にスローされるので戻らない
- 例外:
ExecutionControl.RunException- 通常の例外発生の場合ExecutionControl.InternalException- 内部問題の場合
-
throwConvertedOtherException
protected String throwConvertedOtherException(Throwable ex) throws ExecutionControl.RunException, ExecutionControl.InternalException
エージェント・コードの受信例外をExecutionControl.ExecutionControlExceptionのサブタイプのインスタンスに変換し、変換された例外をスローします。- パラメータ:
ex- 変換する例外- 戻り値:
- 常にスローされるので戻らない
- 例外:
ExecutionControl.RunException- 通常の例外発生の場合ExecutionControl.InternalException- 内部問題の場合
-
clientCodeEnter
protected void clientCodeEnter() throws ExecutionControl.InternalExceptionユーザー・コードへの入力をマークします。- 例外:
ExecutionControl.InternalException- 予期しない障害の場合
-
clientCodeLeave
protected void clientCodeLeave() throws ExecutionControl.InternalExceptionユーザー・コードからの出発をマークします。- 例外:
ExecutionControl.InternalException- 予期しない障害の場合
-
-