Java Debug Interface

com.sun.jdi
インタフェース Value

すべてのスーパーインタフェース:
Mirror
既知のサブインタフェースの一覧:
ArrayReference, BooleanValue, ByteValue, CharValue, ClassLoaderReference, ClassObjectReference, DoubleValue, FloatValue, IntegerValue, LongValue, 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() - イベントで返される

以下の表は、ターゲット VM 内の各値をミラーする際に使用される Value のサブインタフェースを示したものです。

PrimitiveValue のサブインタフェース
値の種類 例 -
ターゲット内での表現
以下のインタフェースとしてミラー化される 値の Type
Value.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 のサブインタフェース
値の種類 例 -
ターゲット内での表現
以下のインタフェースとしてミラー化される 値の Type
Value.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

メソッドの概要
 Type type()
          この値の実行時の型を返します。
 
インタフェース com.sun.jdi.Mirror から継承されたメソッド
toString, virtualMachine
 

メソッドの詳細

type

Type type()
この値の実行時の型を返します。

戻り値:
ターゲット VM 内で値の型をミラー化する Type
関連項目:
Type

Java Debug Interface