モジュール jdk.jdi
パッケージ com.sun.jdi

インタフェースValue

すべてのスーパー・インタフェース:
Mirror
既知のすべてのサブインタフェース:
ArrayReference, BooleanValue, ByteValue, CharValue, ClassLoaderReference, ClassObjectReference, DoubleValue, FloatValue, IntegerValue, LongValue, ModuleReference, ObjectReference, PrimitiveValue, ShortValue, StringReference, ThreadGroupReference, ThreadReference, VoidValue

public interface Value extends Mirror
ターゲットVM内に存在する特定の値のミラーです。 このインタフェースは、プリミティブ値とオブジェクト値の両方を含む値階層のルートです。

次に、値にアクセスする例をいくつか示します。

ObjectReference.getValue(Field) - フィールドの値
StackFrame.getValue(LocalVariable) - 変数の値
VirtualMachine.mirrorOf(double) - ターゲットVM内でJDIクライアントによって作成される
ModificationWatchpointEvent.valueToBe() - イベントで返される

次の表は、ValueのサブインタフェースがターゲットVM内の値をミラー・リングするために使用されることを示しています。

PrimitiveValueのサブインタフェース
値の種類 例 -
ターゲット内での表現
次のインタフェースとして
ミラー化される

Value.type()Type
boolean true BooleanValue BooleanType
byte (byte)4 ByteValue ByteType
char 'a' CharValue CharType
double 3.1415926 DoubleValue DoubleType
float 2.5f FloatValue FloatType
int 22 IntegerValue IntegerType
long 1024L LongValue LongType
short (short)12 ShortValue ShortType
void VoidValue VoidType
ObjectReferenceのサブインタフェース
値の種類 例 -
ターゲット内での表現
次のインタフェースとして
ミラー化される

Value.type()Type
クラスのインスタンス this ObjectReference ClassType
配列 new int[5] ArrayReference ArrayType
文字列 "hello" StringReference ClassType
スレッド Thread.currentThread() ThreadReference ClassType
スレッド・グループ Thread.currentThread()
  .getThreadGroup()
ThreadGroupReference ClassType
java.lang.Class
インスタンス
this.getClass() ClassObjectReference ClassType
クラス・ローダー this.getClass()
  .getClassLoader()
ClassLoaderReference ClassType
その他の値
値の種類 例 -
ターゲット内での表現
次のようにミラー化される 値のType
null null null n/a

導入されたバージョン:
1.3
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    この値の実行時の型を返します。

    インタフェース com.sun.jdi.Mirrorで宣言されたメソッド

    toString, virtualMachine
  • メソッドの詳細

    • type

      Type type()
      この値の実行時の型を返します。
      戻り値:
      ターゲットVM内で値の型をミラー化するType
      関連項目: