Package org.eclipse.mat.parser
Interface IObjectReader
-
- All Known Implementing Classes:
DTFJHeapObjectReader,HprofHeapObjectReader
public interface IObjectReaderPart of the parser which retrieves detailed information about an object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()tidy up when snapshot no longer required<A> AgetAddon(java.lang.Class<A> addon)Get additional information about the snapshotvoidopen(ISnapshot snapshot)Open the dump file associated with the snapshotIObjectread(int objectId, ISnapshot snapshot)Get detailed information about an objectlong[]readObjectArrayContent(ObjectArrayImpl array, int offset, int length)Get detailed information about a object arrayjava.lang.ObjectreadPrimitiveArrayContent(PrimitiveArrayImpl array, int offset, int length)Get detailed information about a primitive array
-
-
-
Method Detail
-
open
void open(ISnapshot snapshot) throws SnapshotException, java.io.IOException
Open the dump file associated with the snapshot- Parameters:
snapshot- the snapshot- Throws:
SnapshotException- some other problemjava.io.IOException- an IO problem, or corrupt indexes or unexpected data in the dump
-
read
IObject read(int objectId, ISnapshot snapshot) throws SnapshotException, java.io.IOException
Get detailed information about an object- 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 snapshotjava.io.IOException- an IO problem or unexpected data in the dump
-
readPrimitiveArrayContent
java.lang.Object readPrimitiveArrayContent(PrimitiveArrayImpl array, int offset, int length) throws java.io.IOException, SnapshotException
Get detailed information about a primitive array- Parameters:
array- the arrayoffset- where in the array to startlength- how much to read- Returns:
- a byte[], short[], int[], long[], boolean[], char[], float[], double[]
- Throws:
SnapshotException- some other problem such as where the object is incompatible with the snapshotjava.io.IOException- an IO problem or unexpected data in the dump
-
readObjectArrayContent
long[] readObjectArrayContent(ObjectArrayImpl array, int offset, int length) throws java.io.IOException, SnapshotException
Get detailed information about a object array- Parameters:
array- the arrayoffset- where in the array to startlength- how much to read- Returns:
- an array of object addresses, with 0 for nulls
- Throws:
SnapshotException- some other problem such as where the object is incompatible with the snapshotjava.io.IOException- an IO problem or unexpected data in the dump
-
getAddon
<A> A getAddon(java.lang.Class<A> addon) throws SnapshotExceptionGet additional information about the snapshot- Type Parameters:
A- used to set the return type- Parameters:
addon- type of the additional information- Returns:
- the additional information or null if none available
- Throws:
SnapshotException- an IO problem or unexpected data in the dump
-
close
void close() throws java.io.IOExceptiontidy up when snapshot no longer required- Throws:
java.io.IOException- should not normally occur
-
-