Package org.eclipse.mat.snapshot
Class MultiplePathsFromGCRootsClassRecord
- java.lang.Object
-
- org.eclipse.mat.snapshot.MultiplePathsFromGCRootsClassRecord
-
public class MultiplePathsFromGCRootsClassRecord extends java.lang.Object
Holds one level of multiple paths from Garbage Collection roots merged by class.
-
-
Constructor Summary
Constructors Constructor Description MultiplePathsFromGCRootsClassRecord(IClass clazz, int level, boolean fromRoots, ISnapshot snapshot)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPath(int[] path)
This method is used only when the record is built.IClass
getClazz()
static java.util.Comparator<MultiplePathsFromGCRootsClassRecord>
getComparatorByNumberOfReferencedObjects()
static java.util.Comparator<MultiplePathsFromGCRootsClassRecord>
getComparatorByReferencedHeapSize()
Returns a Comparator ordering the records descending by the total size of referenced objects.int
getCount()
Get the number of paths going through this objectint
getDistinctCount()
Get the number of distinct objects of this classint
getLevel()
java.util.List<int[]>
getPaths()
Get all the paths going through the object (getObjectId())long
getReferencedHeapSize()
Get the total net heap size of all referenced objects (see getReferencedObjects())int[]
getReferencedObjects()
Get the "end" objects for each path.boolean
isFromRoots()
MultiplePathsFromGCRootsClassRecord[]
nextLevel()
Go down to the next level
-
-
-
Method Detail
-
nextLevel
public MultiplePathsFromGCRootsClassRecord[] nextLevel() throws SnapshotException
Go down to the next level- Returns:
- an array of records from the next level
- Throws:
SnapshotException
-
addPath
public void addPath(int[] path)
This method is used only when the record is built. Adds one path to the set of paths- Parameters:
path
-
-
getPaths
public java.util.List<int[]> getPaths()
Get all the paths going through the object (getObjectId())- Returns:
- List<int[]> each element in the list is an int[] representing a path
-
getCount
public int getCount()
Get the number of paths going through this object
-
getDistinctCount
public int getDistinctCount()
Get the number of distinct objects of this class
-
getReferencedHeapSize
public long getReferencedHeapSize() throws SnapshotException
Get the total net heap size of all referenced objects (see getReferencedObjects())- Returns:
- - the total heap size of all referenced objects
- Throws:
SnapshotException
-
getReferencedObjects
public int[] getReferencedObjects()
Get the "end" objects for each path. This is equal to getting all the paths and looking at their element [0]- Returns:
- - an array with all the objects at the end of the paths
-
getComparatorByNumberOfReferencedObjects
public static java.util.Comparator<MultiplePathsFromGCRootsClassRecord> getComparatorByNumberOfReferencedObjects()
-
getComparatorByReferencedHeapSize
public static java.util.Comparator<MultiplePathsFromGCRootsClassRecord> getComparatorByReferencedHeapSize()
Returns a Comparator ordering the records descending by the total size of referenced objects.
-
getClazz
public IClass getClazz()
-
isFromRoots
public boolean isFromRoots()
-
getLevel
public int getLevel()
-
-