Package org.eclipse.mat.hprof
Class HprofParserHandlerImpl
- java.lang.Object
-
- org.eclipse.mat.hprof.HprofParserHandlerImpl
-
- All Implemented Interfaces:
IHprofParserHandler
public class HprofParserHandlerImpl extends Object implements IHprofParserHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.mat.hprof.IHprofParserHandler
IHprofParserHandler.HeapObject
-
-
Field Summary
-
Fields inherited from interface org.eclipse.mat.hprof.IHprofParserHandler
CREATION_DATE, HEAP_POSITION, IDENTIFIER_SIZE, REFERENCE_SIZE, STREAM_LENGTH, VERSION
-
-
Constructor Summary
Constructors Constructor Description HprofParserHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClass(ClassImpl clazz, long filePosition, int idSize, int instsize)
void
addGCRoot(long id, long referrer, int rootType)
void
addObject(IHprofParserHandler.HeapObject object)
void
addProperty(String name, String value)
void
beforePass1(XSnapshotInfo snapshotInfo)
void
beforePass2(IProgressListener monitor)
void
cancel()
IIndexReader.IOne2LongIndex
fillIn(IPreliminaryIndex index, IProgressListener listener)
int
getIdentifierSize()
long
getObjectArrayHeapSize(ClassImpl arrayType, int size)
long
getPrimitiveArrayHeapSize(byte elementType, int size)
XSnapshotInfo
getSnapshotInfo()
ClassImpl
lookupClass(long classId)
IClass
lookupClassByIndex(int objIndex)
IClass
lookupClassByName(String name, boolean failOnMultipleInstances)
IClass
lookupPrimitiveArrayClassByType(byte elementType)
int
mapAddressToId(long address)
void
reportInstanceOfObjectArray(long id, long filePosition, long arrayClassID)
void
reportInstanceOfPrimitiveArray(long id, long filePosition, int arrayType)
void
reportInstanceWithClass(long id, long filePosition, long classID, int size)
List<IClass>
resolveClassHierarchy(long classId)
-
-
-
Method Detail
-
beforePass1
public void beforePass1(XSnapshotInfo snapshotInfo) throws IOException
- Specified by:
beforePass1
in interfaceIHprofParserHandler
- Throws:
IOException
-
beforePass2
public void beforePass2(IProgressListener monitor) throws IOException, SnapshotException
- Specified by:
beforePass2
in interfaceIHprofParserHandler
- Throws:
IOException
SnapshotException
-
fillIn
public IIndexReader.IOne2LongIndex fillIn(IPreliminaryIndex index, IProgressListener listener) throws IOException
- Specified by:
fillIn
in interfaceIHprofParserHandler
- Throws:
IOException
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceIHprofParserHandler
-
addProperty
public void addProperty(String name, String value) throws IOException
- Specified by:
addProperty
in interfaceIHprofParserHandler
- Throws:
IOException
-
addGCRoot
public void addGCRoot(long id, long referrer, int rootType)
- Specified by:
addGCRoot
in interfaceIHprofParserHandler
-
addClass
public void addClass(ClassImpl clazz, long filePosition, int idSize, int instsize) throws IOException
- Specified by:
addClass
in interfaceIHprofParserHandler
- Throws:
IOException
-
addObject
public void addObject(IHprofParserHandler.HeapObject object) throws IOException
- Specified by:
addObject
in interfaceIHprofParserHandler
- Throws:
IOException
-
reportInstanceWithClass
public void reportInstanceWithClass(long id, long filePosition, long classID, int size)
- Specified by:
reportInstanceWithClass
in interfaceIHprofParserHandler
-
reportInstanceOfObjectArray
public void reportInstanceOfObjectArray(long id, long filePosition, long arrayClassID)
- Specified by:
reportInstanceOfObjectArray
in interfaceIHprofParserHandler
-
reportInstanceOfPrimitiveArray
public void reportInstanceOfPrimitiveArray(long id, long filePosition, int arrayType)
- Specified by:
reportInstanceOfPrimitiveArray
in interfaceIHprofParserHandler
-
getIdentifierSize
public int getIdentifierSize()
- Specified by:
getIdentifierSize
in interfaceIHprofParserHandler
-
lookupClass
public ClassImpl lookupClass(long classId)
- Specified by:
lookupClass
in interfaceIHprofParserHandler
-
lookupPrimitiveArrayClassByType
public IClass lookupPrimitiveArrayClassByType(byte elementType)
- Specified by:
lookupPrimitiveArrayClassByType
in interfaceIHprofParserHandler
-
lookupClassByName
public IClass lookupClassByName(String name, boolean failOnMultipleInstances)
- Specified by:
lookupClassByName
in interfaceIHprofParserHandler
-
lookupClassByIndex
public IClass lookupClassByIndex(int objIndex)
- Specified by:
lookupClassByIndex
in interfaceIHprofParserHandler
-
resolveClassHierarchy
public List<IClass> resolveClassHierarchy(long classId)
- Specified by:
resolveClassHierarchy
in interfaceIHprofParserHandler
-
mapAddressToId
public int mapAddressToId(long address)
- Specified by:
mapAddressToId
in interfaceIHprofParserHandler
-
getSnapshotInfo
public XSnapshotInfo getSnapshotInfo()
- Specified by:
getSnapshotInfo
in interfaceIHprofParserHandler
-
getObjectArrayHeapSize
public long getObjectArrayHeapSize(ClassImpl arrayType, int size)
- Specified by:
getObjectArrayHeapSize
in interfaceIHprofParserHandler
-
getPrimitiveArrayHeapSize
public long getPrimitiveArrayHeapSize(byte elementType, int size)
- Specified by:
getPrimitiveArrayHeapSize
in interfaceIHprofParserHandler
-
-