public abstract class GCRootInfo extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
GCRootInfo.Type
Reasons why an heap object is a garbage collection root.
|
| Constructor and Description |
|---|
GCRootInfo(long objectAddress,
long contextAddress,
int type)
Create a description of a Garbage Collection root
|
| Modifier and Type | Method and Description |
|---|---|
long |
getContextAddress()
The object address of the source of the root
|
int |
getContextId()
The object id of the source of the root, if there is a source
|
long |
getObjectAddress()
The object address of the retained object
|
int |
getObjectId()
The object id of the retained object
|
int |
getType()
The reason for the root
|
static String |
getTypeAsString(int type)
A printable version of the type
|
static String |
getTypeSetAsString(GCRootInfo[] roots)
A combined representation of the types of several roots.
|
public GCRootInfo(long objectAddress,
long contextAddress,
int type)
objectAddress - the object which is retainedcontextAddress - the source of the retention - e.g. a thread address, or 0 for nonetype - the reason the object is retained GCRootInfo.Typepublic int getObjectId()
public long getObjectAddress()
public long getContextAddress()
public int getContextId()
public int getType()
GCRootInfo.Typepublic static String getTypeAsString(int type)
type - as GCRootInfo.TypeGCRootInfo.Typepublic static String getTypeSetAsString(GCRootInfo[] roots)
roots - an array of roots to get the combined type fromGCRootInfo.Type