Package org.eclipse.mat.dtfj
Class DTFJHeapObjectReader
java.lang.Object
org.eclipse.mat.dtfj.DTFJHeapObjectReader
- All Implemented Interfaces:
IObjectReader
Reads details of an object from a DTFJ dump.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()tidy up when snapshot no longer required<A> AReturns extra data to be provided byISnapshot.getSnapshotAddons(Class addon).voidOpen the dump file associated with the snapshotGet detailed information about an objectlong[]readObjectArrayContent(ObjectArrayImpl array, int offset, int length) Read some of the contents of an arrayreadPrimitiveArrayContent(PrimitiveArrayImpl array, int offset, int length) Read some of the contents of an array
-
Constructor Details
-
DTFJHeapObjectReader
public DTFJHeapObjectReader()
-
-
Method Details
-
close
Description copied from interface:IObjectReadertidy up when snapshot no longer required- Specified by:
closein interfaceIObjectReader- Throws:
IOException- should not normally occur
-
getAddon
Returns extra data to be provided byISnapshot.getSnapshotAddons(Class addon). Also can be returned viaArgument.- Specified by:
getAddonin interfaceIObjectReader- Type Parameters:
A- used to set the return type- Parameters:
addon- the type of the extra data required from the dump Types supported by DTFJHeapObjectReader include- Returns:
- the extra data
- Throws:
SnapshotException- an IO problem or unexpected data in the dump- See Also:
-
open
Description copied from interface:IObjectReaderOpen the dump file associated with the snapshot- Specified by:
openin interfaceIObjectReader- Parameters:
snapshot- the snapshot- Throws:
IOException- an IO problem, or corrupt indexes or unexpected data in the dumpSnapshotException- some other problem
-
read
Description copied from interface:IObjectReaderGet detailed information about an object- Specified by:
readin interfaceIObjectReader- Parameters:
objectId- the object idsnapshot- the snapshot- Returns:
- an IObject such as
InstanceImpl,ObjectArrayImpl,PrimitiveArrayImpl,ClassLoaderImpl - Throws:
SnapshotException- some other problem such as where the object is incompatible with the snapshotIOException- an IO problem or unexpected data in the dump
-
readPrimitiveArrayContent
public Object readPrimitiveArrayContent(PrimitiveArrayImpl array, int offset, int length) throws IOException, SnapshotException Read some of the contents of an array- Specified by:
readPrimitiveArrayContentin interfaceIObjectReader- Parameters:
array- The MAT array to be readoffset- the offset into the arraylength- the number of items to be read- Returns:
- A primitive array holding the items
- Throws:
IOException- an IO problem or unexpected data in the dumpSnapshotException- some other problem such as where the object is incompatible with the snapshot
-
readObjectArrayContent
public long[] readObjectArrayContent(ObjectArrayImpl array, int offset, int length) throws IOException, SnapshotException Read some of the contents of an array- Specified by:
readObjectArrayContentin interfaceIObjectReader- Parameters:
array- The MAT array to be readoffset- the offset into the arraylength- the number of items to be read- Returns:
- A array of longs holding the addresses of the objects in the array
- Throws:
IOException- an IO problem or unexpected data in the dumpSnapshotException- some other problem such as where the object is incompatible with the snapshot
-