-
- All Superinterfaces:
-
Mirror
- All Known Subinterfaces:
-
ArrayReference,BooleanValue,ByteValue,CharValue,ClassLoaderReference,ClassObjectReference,DoubleValue,FloatValue,IntegerValue,LongValue,ModuleReference,ObjectReference,PrimitiveValue,ShortValue,StringReference,ThreadGroupReference,ThreadReference,VoidValue
public interface Value extends Mirror
目标VM中的值的镜像。 此接口是包含原始值和对象值的值层次结构的根。可以访问值的一些示例:
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 下表说明了哪些子接口的值用于镜像目标VM中的值 -
Maps each kind of value to a mirrored instance of a subinterface of Value Subinterfaces ofPrimitiveValueKind of value For example -
expression in target Is mirrored as an
instance ofTypeof valueValue.type()a booleantrueBooleanValueBooleanTypea byte(byte)4ByteValueByteTypea char'a'CharValueCharTypea double3.1415926DoubleValueDoubleTypea float2.5fFloatValueFloatTypean int22IntegerValueIntegerTypea long1024LLongValueLongTypea short(short)12ShortValueShortTypea voidVoidValueVoidTypeSubinterfaces ofObjectReferenceKind of value For example -
expression in target Is mirrored as an
instance ofTypeof valueValue.type()a class instancethisObjectReferenceClassTypean arraynew int[5]ArrayReferenceArrayTypea string"hello"StringReferenceClassTypea threadThread.currentThread()ThreadReferenceClassTypea thread groupThread.currentThread()
.getThreadGroup()ThreadGroupReferenceClassTypeajava.lang.Class
instancethis.getClass()ClassObjectReferenceClassTypea class loaderthis.getClass()
.getClassLoader()ClassLoaderReferenceClassTypeOther Kind of value For example -
expression in target Is mirrored asTypeof value nullnullnulln/a- 从以下版本开始:
- 1.3