|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mat.parser.model.AbstractObjectImpl
org.eclipse.mat.parser.model.AbstractArrayImpl
org.eclipse.mat.parser.model.PrimitiveArrayImpl
public class PrimitiveArrayImpl
Implementation of a primitive array of type byte[], short[], int[], long[], boolean, char[], float[], double[].
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject |
|---|
IObject.Type |
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.mat.snapshot.model.IPrimitiveArray |
|---|
COMPONENT_TYPE, ELEMENT_SIZE, SIGNATURES, TYPE |
| Constructor Summary | |
|---|---|
PrimitiveArrayImpl(int objectId,
long address,
ClassImpl classInstance,
int length,
int type)
Constructs a primitive array |
|
| Method Summary | |
|---|---|
static long |
doGetUsedHeapSize(ClassImpl clazz,
int length,
int type)
Calculates the size of a primitive array |
Class<?> |
getComponentType()
Returns the component type of the array. |
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. |
int |
getType()
Returns the IObject.Type of the primitive array. |
long |
getUsedHeapSize()
Get used heap size of just this object. |
Object |
getValueArray()
Get the primitive Java array. |
Object |
getValueArray(int offset,
int length)
Get the primitive Java array, beginning at offset and
length number of elements. |
Object |
getValueAt(int index)
Returns the value of the array at the specified index |
| Methods inherited from class org.eclipse.mat.parser.model.AbstractArrayImpl |
|---|
getInfo, getLength, getTechnicalName, setInfo, setLength |
| Methods inherited from class org.eclipse.mat.parser.model.AbstractObjectImpl |
|---|
equals, getClassAddress, getClassId, getClassSpecificName, getClazz, getComparatorForClassSpecificName, getComparatorForTechnicalName, getComparatorForUsedHeapSize, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getRetainedHeapSize, getSnapshot, hashCode, resolveValue, setClassInstance, setObjectAddress, setObjectId, setSnapshot, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.mat.snapshot.model.IArray |
|---|
getLength |
| Methods inherited from interface org.eclipse.mat.snapshot.model.IObject |
|---|
getClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getRetainedHeapSize, getSnapshot, getTechnicalName, resolveValue |
| Constructor Detail |
|---|
public PrimitiveArrayImpl(int objectId,
long address,
ClassImpl classInstance,
int length,
int type)
objectId - the id of the arrayaddress - the address of the arrayclassInstance - the type (class) of the arraylength - the length in elementstype - the actual type IObject.Type| Method Detail |
|---|
public int getType()
IPrimitiveArrayIObject.Type of the primitive array.
getType in interface IPrimitiveArraypublic Class<?> getComponentType()
IPrimitiveArray
getComponentType in interface IPrimitiveArraypublic Object getValueAt(int index)
IPrimitiveArray
getValueAt in interface IPrimitiveArrayindex - from 0 to length-1
public Object getValueArray()
IPrimitiveArray
if (char.class == array.getComponentType())
{
char[] content = (char[]) array.getValueArray();
System.out.println(content.length);
}
The return value must not be modified because it is cached by the heap
dump adapter. This method does not return a copy of the array for
performance reasons.
getValueArray in interface IPrimitiveArray
public Object getValueArray(int offset,
int length)
IPrimitiveArrayoffset and
length number of elements.
The return value must not be modified because it is cached by the heap dump adapter. This method does not return a copy of the array for performance reasons.
getValueArray in interface IPrimitiveArraypublic ArrayLong getReferences()
AbstractObjectImpl
getReferences in class AbstractObjectImplpublic List<NamedReference> getOutboundReferences()
IObject
getOutboundReferences in interface IObjectpublic long getUsedHeapSize()
IObject
getUsedHeapSize in interface IObjectgetUsedHeapSize in class AbstractObjectImpl
public static long doGetUsedHeapSize(ClassImpl clazz,
int length,
int type)
clazz - the typelength - the length in elementstype - the actual type IObject.Type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||