Package org.eclipse.mat.snapshot.model
Class ObjectReference
java.lang.Object
org.eclipse.mat.snapshot.model.ObjectReference
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NamedReference
The value of a field if it is an object reference.
Also can be used to retrieve an IObject from its address
even if the object has not been indexed provided that the
snapshot parser supports the reading of unindexed or
discarded objects.
- See Also:
-
Constructor Summary
ConstructorDescriptionObjectReference
(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
-
Constructor Details
-
ObjectReference
Create a reference to an object based on its address but in a form where the object id can be found.- Parameters:
snapshot
- the snapshotaddress
- the address of the object
-
-
Method Details
-
getObjectAddress
public long getObjectAddress()The actual address of the object- Returns:
- the address
-
getObjectId
The id of the object- Returns:
- the object id
- Throws:
SnapshotException
- if the object has not been indexed, for example if it is unreachable or has been discarded.
-
getObject
Get a detailed view of the object. Can be used to find an unindexed object by its addresss if the snapshot parser supports that.- Returns:
- the object detail
- Throws:
SnapshotException
- if there is a problem retrieving the object
-
toString
A simple view of the object as an address -
hashCode
public int hashCode() -
equals
-