Class XClassHistogramRecord

  • All Implemented Interfaces:
    java.io.Serializable

    public final class XClassHistogramRecord
    extends ClassHistogramRecord
    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:
    Serialized Form
    • Constructor Detail

      • XClassHistogramRecord

        public XClassHistogramRecord​(ClassImpl classInstance)
                              throws SnapshotException
        Create an XClassHistogramRecord by retrieving information from the class
        Parameters:
        classInstance - the class
        Throws:
        SnapshotException
    • Method Detail

      • getClassId

        public int getClassId()
        Description copied from class: ClassHistogramRecord
        Get id of the class this class histogram record stands for.
        Overrides:
        getClassId in class ClassHistogramRecord
        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 class ClassHistogramRecord
        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 class ClassHistogramRecord
        Parameters:
        snapshot - the snapshot
        calculateIfNotAvailable - whether to calculate the size if not already available
        approximation - 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