|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mat.parser.model.AbstractObjectImpl
public abstract class AbstractObjectImpl
The general implementation of any Java object (plain object, array, class, classloader).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject |
|---|
IObject.Type |
| Constructor Summary | |
|---|---|
AbstractObjectImpl(int objectId,
long address,
ClassImpl classInstance)
Construct a general object, called from subclass. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
long |
getClassAddress()
Returns the address of the class which is the type of this object. |
int |
getClassId()
Returns the id of the class which is the type of this object. |
String |
getClassSpecificName()
Get class specific name of this object which depends on the availability of the appropriate name resolver, e.g. |
ClassImpl |
getClazz()
Get class snapshot object this object is an instance of. |
static Comparator<AbstractObjectImpl> |
getComparatorForClassSpecificName()
Deprecated. |
static Comparator<AbstractObjectImpl> |
getComparatorForTechnicalName()
Deprecated. |
static Comparator<AbstractObjectImpl> |
getComparatorForUsedHeapSize()
Deprecated. |
String |
getDisplayName()
Get concatenation of IObject.getTechnicalName() and
IObject.getClassSpecificName(). |
GCRootInfo[] |
getGCRootInfo()
Get GCRootInfo if the object is a garbage collection root or null
otherwise. |
long |
getObjectAddress()
Get address for the snapshot object. |
int |
getObjectId()
Get id for the snapshot object. |
abstract ArrayLong |
getReferences()
Gets the outbound references from this object, as addresses. |
long |
getRetainedHeapSize()
Get retained heap size of this object. |
ISnapshot |
getSnapshot()
Returns the snapshot from which this object has been read. |
String |
getTechnicalName()
Get technical name of this object which is something like class@address. |
abstract long |
getUsedHeapSize()
Get used heap size of just this object. |
int |
hashCode()
|
Object |
resolveValue(String name)
Resolves and returns the value of a field specified by a dot notation. |
void |
setClassInstance(ClassImpl classInstance)
Changes the type of the object. |
void |
setObjectAddress(long address)
Used to set the address, for example after reconstructing an object from a file. |
void |
setObjectId(int objectId)
Set the index for the object |
void |
setSnapshot(ISnapshot dump)
Set the snapshot for an object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.mat.snapshot.model.IObject |
|---|
getOutboundReferences |
| Constructor Detail |
|---|
public AbstractObjectImpl(int objectId,
long address,
ClassImpl classInstance)
objectId - the index of the objectaddress - the actual addressclassInstance - the type of the object| Method Detail |
|---|
public long getObjectAddress()
IObjectlong), have no consecutive order (with gaps), and are not
used for hashing.
getObjectAddress in interface IObjectpublic int getObjectId()
IObjectint (this helps
reducing the memory footprint of the snapshot considerably - addresses
are only used for visualization purposes).
getObjectId in interface IObjectpublic void setObjectAddress(long address)
address - public void setObjectId(int objectId)
objectId - the index into all the indexes for other object datapublic ClassImpl getClazz()
IObject
getClazz in interface IObjectpublic long getClassAddress()
public int getClassId()
public void setClassInstance(ClassImpl classInstance)
classInstance - public void setSnapshot(ISnapshot dump)
dump - the actual current snapshotpublic ISnapshot getSnapshot()
IObject
getSnapshot in interface IObjectpublic abstract long getUsedHeapSize()
IObject
getUsedHeapSize in interface IObjectpublic long getRetainedHeapSize()
IObject
getRetainedHeapSize in interface IObjectpublic abstract ArrayLong getReferences()
public String toString()
toString in class Objectpublic String getClassSpecificName()
IObject
getClassSpecificName in interface IObjectpublic String getTechnicalName()
IObject
getTechnicalName in interface IObjectpublic String getDisplayName()
IObjectIObject.getTechnicalName() and
IObject.getClassSpecificName().
getDisplayName in interface IObjectIObject.getTechnicalName() and
IObject.getClassSpecificName()
public final Object resolveValue(String name)
throws SnapshotException
IObjectThe field can be specified using the dot notation, i.e. object references are followed and its fields are evaluated. If any of the object references is null, null is returned.
resolveValue in interface IObjectname - the field name in dot notation
SnapshotException
public GCRootInfo[] getGCRootInfo()
throws SnapshotException
IObjectGCRootInfo if the object is a garbage collection root or null
otherwise. An object may or may not be a garbage collection root, it may
even be one for multiple reasons (described in the GCRootInfo
object).
getGCRootInfo in interface IObjectGCRootInfo if the object is a garbage collection root or
null otherwise
SnapshotExceptionpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object@Deprecated public static Comparator<AbstractObjectImpl> getComparatorForTechnicalName()
@Deprecated public static Comparator<AbstractObjectImpl> getComparatorForClassSpecificName()
@Deprecated public static Comparator<AbstractObjectImpl> getComparatorForUsedHeapSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||