Some examples of where values may be accessed:
{@link ObjectReference#getValue(com.sun.jdi.Field) ObjectReference.getValue(Field)} - value of a field {@link StackFrame#getValue(com.sun.jdi.LocalVariable) StackFrame.getValue(LocalVariable)} - value of a variable {@link VirtualMachine#mirrorOf(double) VirtualMachine.mirrorOf(double)} - created in the target VM by the JDI client {@link com.sun.jdi.event.ModificationWatchpointEvent#valueToBe() 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 {@link PrimitiveValue} | |||
|---|---|---|---|
| Kind of value | For example - expression in target | Is mirrored as an instance of | {@link Type} of value {@link #type() Value.type()} |
| a boolean | true | {@link BooleanValue} | {@link BooleanType} |
| a byte | (byte)4 | {@link ByteValue} | {@link ByteType} |
| a char | 'a' | {@link CharValue} | {@link CharType} |
| a double | 3.1415926 | {@link DoubleValue} | {@link DoubleType} |
| a float | 2.5f | {@link FloatValue} | {@link FloatType} |
| an int | 22 | {@link IntegerValue} | {@link IntegerType} |
| a long | 1024L | {@link LongValue} | {@link LongType} |
| a short | (short)12 | {@link ShortValue} | {@link ShortType} |
| a void | | {@link VoidValue} | {@link VoidType} |
| Subinterfaces of {@link ObjectReference} | |||
| Kind of value | For example - expression in target | Is mirrored as an instance of | {@link Type} of value {@link #type() Value.type()} |
| a class instance | this | {@link ObjectReference} | {@link ClassType} |
| an array | new int[5] | {@link ArrayReference} | {@link ArrayType} |
| a string | "hello" | {@link StringReference} | {@link ClassType} |
| a thread | Thread.currentThread() | {@link ThreadReference} | {@link ClassType} |
| a thread group | Thread.currentThread() | {@link ThreadGroupReference} | {@link ClassType} |
a java.lang.Classinstance | this.getClass() | {@link ClassObjectReference} | {@link ClassType} |
| a class loader | this.getClass() | {@link ClassLoaderReference} | {@link ClassType} |
| Other | |||
| Kind of value | For example - expression in target | Is mirrored as | {@link Type} of value |
| null | null | null | n/a |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |