Package org.eclipse.mat.parser.model
Class XClassHistogramRecord
java.lang.Object
org.eclipse.mat.snapshot.HistogramRecord
org.eclipse.mat.snapshot.ClassHistogramRecord
org.eclipse.mat.parser.model.XClassHistogramRecord
- All Implemented Interfaces:
Serializable
Holds details about a class, the number of instances and the shallow and retained sizes.
This hold a direct link to the class instance.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.mat.snapshot.HistogramRecord
COMPARATOR_FOR_LABEL, COMPARATOR_FOR_NUMBEROFOBJECTS, COMPARATOR_FOR_RETAINEDHEAPSIZE, COMPARATOR_FOR_USEDHEAPSIZE
-
Constructor Summary
ConstructorDescriptionXClassHistogramRecord
(ClassImpl classInstance) Create an XClassHistogramRecord by retrieving information from the class -
Method Summary
Modifier and TypeMethodDescriptionlong
calculateRetainedSize
(ISnapshot snapshot, boolean calculateIfNotAvailable, boolean approximation, IProgressListener listener) Find out the retained sizeint
Get id of the class this class histogram record stands for.int[]
Get ids of the objects this class histogram record stands for.Methods inherited from class org.eclipse.mat.snapshot.ClassHistogramRecord
toString
Methods inherited from class org.eclipse.mat.snapshot.HistogramRecord
getLabel, getNumberOfObjects, getRetainedHeapSize, getUsedHeapSize, incNumberOfObjects, incNumberOfObjects, incRetainedHeapSize, incUsedHeapSize, reverseComparator, setLabel, setNumberOfObjects, setRetainedHeapSize, setUsedHeapSize
-
Constructor Details
-
XClassHistogramRecord
Create an XClassHistogramRecord by retrieving information from the class- Parameters:
classInstance
- the class- Throws:
SnapshotException
-
-
Method Details
-
getClassId
public int getClassId()Description copied from class:ClassHistogramRecord
Get id of the class this class histogram record stands for.- Overrides:
getClassId
in classClassHistogramRecord
- Returns:
- id of the class this class histogram record stands for
-
getObjectIds
public int[] getObjectIds()Description copied from class:ClassHistogramRecord
Get ids of the objects this class histogram record stands for.- Overrides:
getObjectIds
in classClassHistogramRecord
- Returns:
- ids of the objects this class histogram record stands for
-
calculateRetainedSize
public long calculateRetainedSize(ISnapshot snapshot, boolean calculateIfNotAvailable, boolean approximation, IProgressListener listener) throws SnapshotException Description copied from class:ClassHistogramRecord
Find out the retained size- Overrides:
calculateRetainedSize
in classClassHistogramRecord
- Parameters:
snapshot
- the snapshotcalculateIfNotAvailable
- whether to calculate the size if not already availableapproximation
- whether to use an approximation to the retained size (sum of the individual retained sizes)listener
- to report progress and errors- Returns:
- the retained size, negated if approximate, 0 if not available
- Throws:
SnapshotException
-