Package org.eclipse.mat.parser.model
Class AbstractArrayImpl
java.lang.Object
org.eclipse.mat.parser.model.AbstractObjectImpl
org.eclipse.mat.parser.model.AbstractArrayImpl
- All Implemented Interfaces:
Serializable,IArray,IObject
- Direct Known Subclasses:
ObjectArrayImpl,PrimitiveArrayImpl
The general implementation of any Java array object (primitive array, object array).
- See Also:
- No Extend:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject
IObject.Type -
Constructor Summary
ConstructorsConstructorDescriptionAbstractArrayImpl(int objectId, long address, ClassImpl classInstance, int length) Construct a general object, called from subclass. -
Method Summary
Modifier and TypeMethodDescriptiongetInfo()Gets the cached information about the contents of the array.intReturns the length of the array in elements.longGet address for the snapshot object.intGet id for the snapshot object.Get technical name of this object which is something like class@address.voidSets the cached information about the contents of the array.voidsetLength(int i) Sets the length in elements.Methods inherited from class org.eclipse.mat.parser.model.AbstractObjectImpl
equals, getClassAddress, getClassId, getClassSpecificName, getClazz, getComparatorForClassSpecificName, getComparatorForTechnicalName, getComparatorForUsedHeapSize, getDisplayName, getGCRootInfo, getReferences, getRetainedHeapSize, getSnapshot, getUsedHeapSize, hashCode, resolveValue, setClassInstance, setObjectAddress, setObjectId, setSnapshot, toStringMethods inherited from interface org.eclipse.mat.snapshot.model.IObject
getClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getOutboundReferences, getRetainedHeapSize, getSnapshot, getUsedHeapSize, resolveValue
-
Constructor Details
-
AbstractArrayImpl
Construct a general object, called from subclass.- Parameters:
objectId- the index of the objectaddress- the actual addressclassInstance- the type of the objectlength- the length of the array in elements
-
-
Method Details
-
getInfo
Gets the cached information about the contents of the array.- Returns:
- the cached data (parser specific).
-
setInfo
Sets the cached information about the contents of the array.- Parameters:
content- from theIObjectReader
-
getLength
public int getLength()Description copied from interface:IArrayReturns the length of the array in elements. -
setLength
public void setLength(int i) Sets the length in elements.- Parameters:
i- the new length
-
getTechnicalName
Description copied from interface:IObjectGet technical name of this object which is something like class@address.- Specified by:
getTechnicalNamein interfaceIObject- Overrides:
getTechnicalNamein classAbstractObjectImpl- Returns:
- technical name of this object which is something like class@address
-
getObjectId
public int getObjectId()Description copied from interface:IObjectGet id for the snapshot object. The id is not the address, but an internally assigned number fitting into anint(this helps reducing the memory footprint of the snapshot considerably - addresses are only used for visualization purposes).- Specified by:
getObjectIdin interfaceIObject- Overrides:
getObjectIdin classAbstractObjectImpl- Returns:
- id for the snapshot object
-
getObjectAddress
public long getObjectAddress()Description copied from interface:IObjectGet address for the snapshot object. This is the address at which the object was stored in memory. Use the address only for visualization purposes and try to use the id wherever possible as the snapshot API is optimized to handle ids and not addresses. Addresses are bigger (long), have no consecutive order (with gaps), and are not used for hashing.- Specified by:
getObjectAddressin interfaceIObject- Overrides:
getObjectAddressin classAbstractObjectImpl- Returns:
- address for the snapshot object
-