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 void
classesRedefined(ExecutionControl.ClassBytecodes[] cbcs)
クラスが再定義されたことを通知します。protected void
clientCodeEnter()
ユーザー・コードへのエントリをマークします。protected void
clientCodeLeave()
ユーザー・コードから出発します。protected Class<?>
findClass(String name)
指定されたバイナリ名を持つクラスを探します。protected String
invoke(Method doitMethod)
パラメータを指定しない静的メソッド"doit-method"を呼び出します。void
stop()
実行中の呼び出しを中断します。protected String
throwConvertedInvocationException(Throwable cause)
ユーザー・コードの受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。protected String
throwConvertedOtherException(Throwable ex)
エージェント・コード内の受信例外をExecutionControl.ExecutionControlException
のサブ型のインスタンスに変換し、変換された例外をスローします。protected static String
valueString(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
-
コンストラクタの詳細
-
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
パラメータを指定しない静的メソッド"doit-method"を呼び出します。 このクラスのExecutionControl.invoke(java.lang.String, java.lang.String)
はこれを呼び出して呼び出します。- パラメータ:
doitMethod
- 呼び出すメソッド- 戻り値:
- 値またはnull
- 例外:
Exception
-Method.invoke(Object, Object...)
または任意のExecutionControl.ExecutionControlException
によってパススルーにスローされた例外。
-
valueString
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
- 予期しない失敗事例で
-