Package org.eclipse.mat.parser.model

## Class XGCRootInfo

- java.lang.Object
- - org.eclipse.mat.snapshot.model.GCRootInfo
  - - org.eclipse.mat.parser.model.XGCRootInfo

All Implemented Interfaces:
  `java.io.Serializable`

    public final class XGCRootInfo
    extends GCRootInfo

Holds details about a garbage collection root. Allows the object id and the context id (the source reference) to be set once the snapshot is reindexed.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.mat.snapshot.model.GCRootInfo

`GCRootInfo.Type`

### Constructor Summary

Constructors
`XGCRootInfo​(long objectAddress, long contextAddress, int type)` Create a record of one GC root.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `setContextId​(int objectId)` Set the object which retains this object.
`void` `setObjectId​(int objectId)` Sets the object ID associated with the object address.

### Methods inherited from class org.eclipse.mat.snapshot.model.GCRootInfo

`getContextAddress, getContextId, getObjectAddress, getObjectId, getType, getTypeAsString, getTypeSetAsString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XGCRootInfo

    public XGCRootInfo​(long objectAddress,
                       long contextAddress,
                       int type)

Create a record of one GC root.

Parameters:
  `objectAddress` - the object being retained
  `contextAddress` - the object doing the retention such as a thread
  `type` - the type `GCRootInfo.Type` of the root such as Java local, system class.

### Method Detail

#### setObjectId

    public void setObjectId​(int objectId)

Sets the object ID associated with the object address.

Parameters:
  `objectId` - the object
See Also:
  `GCRootInfo.getObjectId()`

#### setContextId

    public void setContextId​(int objectId)

Set the object which retains this object.

Parameters:
  `objectId` - the object ID associated with the content address
See Also:
  `GCRootInfo.getContextId()`