Package org.eclipse.mat.parser.model
Class ObjectArrayImpl
java.lang.Object
org.eclipse.mat.parser.model.AbstractObjectImpl
org.eclipse.mat.parser.model.AbstractArrayImpl
org.eclipse.mat.parser.model.ObjectArrayImpl
- All Implemented Interfaces:
Serializable
,IArray
,IObject
,IObjectArray
Implementation of a Java object array.
- See Also:
- No Extend:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject
IObject.Type
-
Constructor Summary
ConstructorDescriptionObjectArrayImpl
(int objectId, long address, ClassImpl classInstance, int length) Constructs an array of objects. -
Method Summary
Modifier and TypeMethodDescriptionstatic long
doGetUsedHeapSize
(ClassImpl clazz, int length) Calculates the size of an object arrayGet list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced.long[]
Get an array with the object addresses.long[]
getReferenceArray
(int offset, int length) Get an array with the object addresses, beginning atoffset
andlength
number of elements.Gets the outbound references from this object, as addresses.long
Get used heap size of just this object.Methods inherited from class org.eclipse.mat.parser.model.AbstractArrayImpl
getInfo, getLength, getObjectAddress, getObjectId, getTechnicalName, setInfo, setLength
Methods inherited from class org.eclipse.mat.parser.model.AbstractObjectImpl
equals, getClassAddress, getClassId, getClassSpecificName, getClazz, getComparatorForClassSpecificName, getComparatorForTechnicalName, getComparatorForUsedHeapSize, getDisplayName, getGCRootInfo, getRetainedHeapSize, getSnapshot, hashCode, resolveValue, setClassInstance, setObjectAddress, setObjectId, setSnapshot, toString
Methods inherited from interface org.eclipse.mat.snapshot.model.IObject
getClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getRetainedHeapSize, getSnapshot, getTechnicalName, resolveValue
-
Constructor Details
-
ObjectArrayImpl
Constructs an array of objects.- Parameters:
objectId
- the object id of the arrayaddress
- the actual addressclassInstance
- the type of the arraylength
- the length of the array in elements
-
-
Method Details
-
getUsedHeapSize
public long getUsedHeapSize()Description copied from interface:IObject
Get used heap size of just this object.- Specified by:
getUsedHeapSize
in interfaceIObject
- Specified by:
getUsedHeapSize
in classAbstractObjectImpl
- Returns:
- used heap size of this object
-
doGetUsedHeapSize
Calculates the size of an object array- Parameters:
clazz
- the typelength
- the length in elements- Returns:
- the size in bytes
- Since:
- 1.0
-
getReferenceArray
public long[] getReferenceArray()Description copied from interface:IObjectArray
Get an array with the object addresses. 0 indicatesnull
values in the array.- Specified by:
getReferenceArray
in interfaceIObjectArray
- Returns:
- the addresses of the objects held in the array, in index order
-
getReferenceArray
public long[] getReferenceArray(int offset, int length) Description copied from interface:IObjectArray
Get an array with the object addresses, beginning atoffset
andlength
number of elements.- Specified by:
getReferenceArray
in interfaceIObjectArray
- Parameters:
offset
- where to startlength
- how many entries to return- Returns:
- the addresses of the objects held in the array, in index order from the index starting at offset, with length entries
-
getReferences
Description copied from class:AbstractObjectImpl
Gets the outbound references from this object, as addresses.- Specified by:
getReferences
in classAbstractObjectImpl
- Returns:
- a list of outbound references
-
getOutboundReferences
Description copied from interface:IObject
Get list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced.- Specified by:
getOutboundReferences
in interfaceIObject
- Returns:
- list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced
-