|
Java Debug Interface | ||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
public interface Value
ターゲット 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() | ThreadGroupReference | ClassType |
java.lang.Class のインスタンス | this.getClass() | ClassObjectReference | ClassType |
クラスローダ | this.getClass() | ClassLoaderReference | ClassType |
その他 | |||
値の種類 | 例 - ターゲット内での表現 | 以下のようにミラー化される | 値の Type |
null | null | null | n/a |
メソッドの概要 | |
---|---|
Type |
type()
この値の実行時の型を返します。 |
インタフェース com.sun.jdi.Mirror から継承されたメソッド |
---|
toString, virtualMachine |
メソッドの詳細 |
---|
Type type()
Type
Type
|
Java Debug Interface | ||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |