public class PrimitiveArrayImpl extends AbstractArrayImpl implements IPrimitiveArray
IObject.TypeCOMPONENT_TYPE, ELEMENT_SIZE, SIGNATURES, TYPE| Constructor and Description |
|---|
PrimitiveArrayImpl(int objectId,
long address,
ClassImpl classInstance,
int length,
int type)
Constructs a primitive array
|
| Modifier and Type | Method and Description |
|---|---|
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
|
getInfo, getLength, getTechnicalName, setInfo, setLengthequals, getClassAddress, getClassId, getClassSpecificName, getClazz, getComparatorForClassSpecificName, getComparatorForTechnicalName, getComparatorForUsedHeapSize, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getRetainedHeapSize, getSnapshot, hashCode, resolveValue, setClassInstance, setObjectAddress, setObjectId, setSnapshot, toStringgetClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getRetainedHeapSize, getSnapshot, getTechnicalName, resolveValuepublic 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.Typepublic int getType()
IPrimitiveArrayIObject.Type of the primitive array.getType in interface IPrimitiveArraypublic Class<?> getComponentType()
IPrimitiveArraygetComponentType in interface IPrimitiveArraypublic Object getValueAt(int index)
IPrimitiveArraygetValueAt in interface IPrimitiveArrayindex - from 0 to length-1public 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 IPrimitiveArraypublic 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()
AbstractObjectImplgetReferences in class AbstractObjectImplpublic List<NamedReference> getOutboundReferences()
IObjectgetOutboundReferences in interface IObjectpublic long getUsedHeapSize()
IObjectgetUsedHeapSize in interface IObjectgetUsedHeapSize in class AbstractObjectImplpublic static long doGetUsedHeapSize(ClassImpl clazz, int length, int type)
clazz - the typelength - the length in elementstype - the actual type IObject.Type