- 所有超级接口:
-
Mirror
- 所有已知子接口:
-
ArrayReference,BooleanValue,ByteValue,CharValue,ClassLoaderReference,ClassObjectReference,DoubleValue,FloatValue,IntegerValue,LongValue,ModuleReference,ObjectReference,PrimitiveValue,ShortValue,StringReference,ThreadGroupReference,ThreadReference,VoidValue
目标虚拟机中值的镜像。该接口是一个包含原始值和对象值的值层次结构的根。
一些访问值的示例:
ObjectReference.getValue(Field)- 字段的值 StackFrame.getValue(LocalVariable)- 变量的值 VirtualMachine.mirrorOf(double)- 由JDI客户端在目标虚拟机中创建 ModificationWatchpointEvent.valueToBe()- 与事件一起返回的值
以下表格说明了在目标虚拟机中使用哪些Value的子接口来镜像值--
| 值的类型 | 例如 - 目标中的表达式 |
镜像为 的实例 |
Type的值类型Value.type() |
|---|---|---|---|
| 布尔值 | true |
BooleanValue |
BooleanType |
| 字节 | (byte)4 |
ByteValue |
ByteType |
| 字符 | 'a' |
CharValue |
CharType |
| 双精度 | 3.1415926 |
DoubleValue |
DoubleType |
| 浮点数 | 2.5f |
FloatValue |
FloatType |
| 整数 | 22 |
IntegerValue |
IntegerType |
| 长整数 | 1024L |
LongValue |
LongType |
| 短整数 | (short)12 |
ShortValue |
ShortType |
| 空值 | VoidValue |
VoidType |
| 值的类型 | 例如 - 目标中的表达式 |
镜像为 的实例 |
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
-
Method Summary
Methods declared in interface com.sun.jdi.Mirror
toString, virtualMachine