|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Value
The mirror for a value in the target VM. This interface is the root of a value hierarchy encompassing primitive values and object values.
Some examples of where values may be accessed:
ObjectReference.getValue(Field)
- value of a field StackFrame.getValue(LocalVariable)
- value of a variable VirtualMachine.mirrorOf(double)
- created in the target VM by the JDI client ModificationWatchpointEvent.valueToBe()
- returned with an event
The following table illustrates which subinterfaces of Value are used to mirror values in the target VM --
Subinterfaces of PrimitiveValue |
|||
---|---|---|---|
Kind of value | For example - expression in target | Is mirrored as an instance of | Type of valueValue.type()
|
a boolean | true |
BooleanValue |
BooleanType |
a byte | (byte)4 |
ByteValue |
ByteType |
a char | 'a' |
CharValue |
CharType |
a double | 3.1415926 |
DoubleValue |
DoubleType |
a float | 2.5f |
FloatValue |
FloatType |
an int | 22 |
IntegerValue |
IntegerType |
a long | 1024L |
LongValue |
LongType |
a short | (short)12 |
ShortValue |
ShortType |
a void | |
VoidValue |
VoidType |
Subinterfaces of ObjectReference |
|||
Kind of value | For example - expression in target | Is mirrored as an instance of | Type of valueValue.type()
|
a class instance | this |
ObjectReference |
ClassType |
an array | new int[5] |
ArrayReference |
ArrayType |
a string | "hello" |
StringReference |
ClassType |
a thread | Thread.currentThread() |
ThreadReference |
ClassType |
a thread group | Thread.currentThread() |
ThreadGroupReference |
ClassType |
a java.lang.Class instance |
this.getClass() |
ClassObjectReference |
ClassType |
a class loader | this.getClass() |
ClassLoaderReference |
ClassType |
Other | |||
Kind of value | For example - expression in target | Is mirrored as | Type of value
|
null | null |
null |
n/a |
Method Summary | |
---|---|
Type |
type()
Returns the run-time type of this value. |
Methods inherited from interface com.sun.jdi.Mirror |
---|
toString, virtualMachine |
Method Detail |
---|
Type type()
Type
which mirrors the value's type in the
target VM.Type
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |