Interface Instance
- All Superinterfaces:
HeapObject
- All Known Subinterfaces:
StringInstance
Represents an object instance from a heap dump. Instances provide access
to the values of their fields.
-
Method Summary
Modifier and TypeMethodDescriptionfieldValue(int fieldIndex) Retrieves the value of an instance field for this object based on its index inClassDescriptor.allInstanceFields().fieldValue(String fieldName) Retrieves the value of an instance field for this object based on its name.Methods inherited from interface HeapObject
classDescriptor, id, referencedObjects, referencingObjects, size
-
Method Details
-
fieldValue
Retrieves the value of an instance field for this object based on its index inClassDescriptor.allInstanceFields(). The field can hold either a primitive value, aHeapObject, or one of its subinterfaces.- Parameters:
fieldIndex- the zero-based index of the instance field. The index must be within the bounds of the fields defined for the object.- Returns:
- the value of the instance field at the specified index, or
nullif no field exists with the specified index, if the field is unavailable, or if the field value itself isnull.
-
fieldValue
Retrieves the value of an instance field for this object based on its name. The field can hold either a primitive value, aHeapObject, or one of its subinterfaces.- Parameters:
fieldName- the name of the instance field to be retrieved. Must not be null.- Returns:
- the value of the instance field with the specified name, or
nullif no field exists with the specified name, if the field is unavailable, or if the field value itself isnull.
-