public class InstanceImpl extends AbstractObjectImpl implements IInstance
IObject.Type| Constructor and Description |
|---|
InstanceImpl(int objectId,
long address,
ClassImpl clazz,
List<Field> fields)
Construct a representation of plain java object in the snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
Field |
getField(String name)
Returns the field identified by the name.
|
List<Field> |
getFields()
Returns all fields of the object.
|
long |
getObjectAddress()
Get address for the snapshot object.
|
int |
getObjectId()
Get id for the snapshot object.
|
List<NamedReference> |
getOutboundReferences()
Get list of snapshot objects referenced from this snapshot object with
the name of the field over which it was referenced.
|
ArrayLong |
getReferences()
Gets the outbound references from this object, as addresses.
|
long |
getUsedHeapSize()
Get used heap size of just this object.
|
equals, getClassAddress, getClassId, getClassSpecificName, getClazz, getComparatorForClassSpecificName, getComparatorForTechnicalName, getComparatorForUsedHeapSize, getDisplayName, getGCRootInfo, getRetainedHeapSize, getSnapshot, getTechnicalName, hashCode, resolveValue, setClassInstance, setObjectAddress, setObjectId, setSnapshot, toStringgetClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getRetainedHeapSize, getSnapshot, getTechnicalName, resolveValuepublic InstanceImpl(int objectId,
long address,
ClassImpl clazz,
List<Field> fields)
objectId - the object idaddress - the actual addressclazz - the type of the objectfields - the instance fields of the object (the static fields are held in the class)public long getObjectAddress()
IObjectlong), have no consecutive order (with gaps), and are not
used for hashing.getObjectAddress in interface IObjectgetObjectAddress in class AbstractObjectImplpublic int getObjectId()
IObjectint (this helps
reducing the memory footprint of the snapshot considerably - addresses
are only used for visualization purposes).getObjectId in interface IObjectgetObjectId in class AbstractObjectImplpublic List<Field> getFields()
IInstanceFields are ordered in such a way, that first fields defined in the current class and then fields of the super class and its super classes are returned. This order is important to know, if a class declares a field by the same name as the class it inherits from.
public Field getField(String name)
IInstanceIf declares a member variable by the same name as the parent class does, then the result of this method is undefined.
public long getUsedHeapSize()
IObjectgetUsedHeapSize in interface IObjectgetUsedHeapSize in class AbstractObjectImplpublic ArrayLong getReferences()
AbstractObjectImplgetReferences in class AbstractObjectImplpublic List<NamedReference> getOutboundReferences()
IObjectgetOutboundReferences in interface IObject