- 所有父级接口:
Mirror
- 所有已知的子接口:
ArrayReference,BooleanValue,ByteValue,CharValue,ClassLoaderReference,ClassObjectReference,DoubleValue,FloatValue,IntegerValue,LongValue,ModuleReference,ObjectReference,PrimitiveValue,ShortValue,StringReference,ThreadGroupReference,ThreadReference,VoidValue
目标 VM 中某个值的镜像。该接口是包含原始值和对象值的值层次结构的根。
可以访问值的一些示例:
ObjectReference.getValue(Field)- 一个字段的值 StackFrame.getValue(LocalVariable)- 变量的值 VirtualMachine.mirrorOf(double)- 由 JDI 客户端在目标 VM 中创建 ModificationWatchpointEvent.valueToBe()- 返回一个事件
下表说明了 Value 的哪些子接口用于镜像目标 VM 中的值——
| 一种值 | 例如 - 目标表达 |
被镜像为 实例 |
Type 的值Value.type() |
|---|---|---|---|
| 一个boolean | 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 |
n/a |
- 自从:
- 1.3
-
方法总结
在接口 com.sun.jdi.Mirror 中声明的方法
toString, virtualMachine