org.eclipse.mat.snapshot.model

## Class ObjectReference

- java.lang.Object
- - org.eclipse.mat.snapshot.model.ObjectReference

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  NamedReference

    public class ObjectReference
    extends Object
    implements Serializable

The value of a field if it is an object reference.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ObjectReference(ISnapshot snapshot, long address)` Create a reference to an object based on its address but in a form where the object id can be found.

### Method Summary

All Methods Instance Methods Concrete Methods
`IObject` `getObject()` Get a detailed view of the object
`long` `getObjectAddress()` The actual address of the object
`int` `getObjectId()` The id of the object
`String` `toString()` A simple view of the object as an address

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

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

### Constructor Detail

#### ObjectReference

    public ObjectReference(ISnapshot snapshot,
                           long address)

Create a reference to an object based on its address but in a form where the object id can be found.

Parameters:
  `snapshot` -
  `address` -

### Method Detail

#### getObjectAddress

    public long getObjectAddress()

The actual address of the object

Returns:
  the address

#### getObjectId

    public int getObjectId()
                    throws SnapshotException

The id of the object

Returns:
  the object id
Throws:
  `SnapshotException`

#### getObject

    public IObject getObject()
                      throws SnapshotException

Get a detailed view of the object

Returns:
  the object detail
Throws:
  `SnapshotException`

#### toString

    public String toString()

A simple view of the object as an address

Overrides:
  `toString` in class `Object`
Returns:
  the object address as a hexadecimal number.