Package org.eclipse.mat.snapshot.model

# Class ThreadToLocalReference

java.lang.Object
org.eclipse.mat.snapshot.model.ObjectReference
org.eclipse.mat.snapshot.model.NamedReference
org.eclipse.mat.snapshot.model.PseudoReference
org.eclipse.mat.snapshot.model.ThreadToLocalReference

All Implemented Interfaces:
  `Serializable`

public class ThreadToLocalReference extends PseudoReference
The class represents a references from a running thread object to objects which are local for this thread. Such objects could be for example java local variables, objects used for synchronization in this thread, etc...

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ThreadToLocalReference(ISnapshot snapshot, long address, String name, int localObjectId, GCRootInfo[] gcRootInfo)`
Create a thread to local reference

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`GCRootInfo[]`
`getGcRootInfo()`
The description of the thread root information.
`int`
`getObjectId()`
The id of the object
`int`
`hashCode()`

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

`getName`

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

`getObject, getObjectAddress, toString`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ThreadToLocalReference

public ThreadToLocalReference(ISnapshot snapshot, long address, String name, int localObjectId, GCRootInfo[] gcRootInfo)
Create a thread to local reference

Parameters:
  `snapshot` - the snapshot
  `address` - the address of the object
  `name` - the description of the reference e.g. the root types surrounded by '<' '>'
  `localObjectId` - the local reference object id
  `gcRootInfo` - a description of the root type e.g. Java local etc.

## Method Details

### getObjectId

public int getObjectId()
Description copied from class: `ObjectReference`
The id of the object

Overrides:
  `getObjectId` in class `ObjectReference`
Returns:
  the object id

### getGcRootInfo

public GCRootInfo[] getGcRootInfo()
The description of the thread root information.

Returns:
  an array of GC information for the local reference

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `PseudoReference`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `PseudoReference`