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, IDENTIFIER_SIZE, REFERENCE_SIZE, STREAM_LENGTH, VERSION`

### Constructor Summary

Constructors
Constructor and Description
`HprofParserHandlerImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`
`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)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HprofParserHandlerImpl

    public HprofParserHandlerImpl()

### Method Detail

#### beforePass1

    public void beforePass1(XSnapshotInfo snapshotInfo)
                     throws IOException

Specified by:
  `beforePass1` in interface `IHprofParserHandler`
Throws:
  `IOException`

#### beforePass2

    public void beforePass2(IProgressListener monitor)
                     throws IOException,
                            SnapshotException

Specified by:
  `beforePass2` in interface `IHprofParserHandler`
Throws:
  `IOException`
  `SnapshotException`

#### fillIn

    public IIndexReader.IOne2LongIndex fillIn(IPreliminaryIndex index)
                                       throws IOException

Specified by:
  `fillIn` in interface `IHprofParserHandler`
Throws:
  `IOException`

#### cancel

    public void cancel()

Specified by:
  `cancel` in interface `IHprofParserHandler`

#### addProperty

    public void addProperty(String name,
                            String value)
                     throws IOException

Specified by:
  `addProperty` in interface `IHprofParserHandler`
Throws:
  `IOException`

#### addGCRoot

    public void addGCRoot(long id,
                          long referrer,
                          int rootType)

Specified by:
  `addGCRoot` in interface `IHprofParserHandler`

#### addClass

    public void addClass(ClassImpl clazz,
                         long filePosition,
                         int idSize,
                         int instsize)
                  throws IOException

Specified by:
  `addClass` in interface `IHprofParserHandler`
Throws:
  `IOException`

#### addObject

    public void addObject(IHprofParserHandler.HeapObject object)
                   throws IOException

Specified by:
  `addObject` in interface `IHprofParserHandler`
Throws:
  `IOException`

#### reportInstanceWithClass

    public void reportInstanceWithClass(long id,
                                        long filePosition,
                                        long classID,
                                        int size)

Specified by:
  `reportInstanceWithClass` in interface `IHprofParserHandler`

#### reportInstanceOfObjectArray

    public void reportInstanceOfObjectArray(long id,
                                            long filePosition,
                                            long arrayClassID)

Specified by:
  `reportInstanceOfObjectArray` in interface `IHprofParserHandler`

#### reportInstanceOfPrimitiveArray

    public void reportInstanceOfPrimitiveArray(long id,
                                               long filePosition,
                                               int arrayType)

Specified by:
  `reportInstanceOfPrimitiveArray` in interface `IHprofParserHandler`

#### getIdentifierSize

    public int getIdentifierSize()

Specified by:
  `getIdentifierSize` in interface `IHprofParserHandler`

#### lookupClass

    public ClassImpl lookupClass(long classId)

Specified by:
  `lookupClass` in interface `IHprofParserHandler`

#### lookupPrimitiveArrayClassByType

    public IClass lookupPrimitiveArrayClassByType(byte elementType)

Specified by:
  `lookupPrimitiveArrayClassByType` in interface `IHprofParserHandler`

#### lookupClassByName

    public IClass lookupClassByName(String name,
                                    boolean failOnMultipleInstances)

Specified by:
  `lookupClassByName` in interface `IHprofParserHandler`

#### lookupClassByIndex

    public IClass lookupClassByIndex(int objIndex)

Specified by:
  `lookupClassByIndex` in interface `IHprofParserHandler`

#### resolveClassHierarchy

    public List<IClass> resolveClassHierarchy(long classId)

Specified by:
  `resolveClassHierarchy` in interface `IHprofParserHandler`

#### mapAddressToId

    public int mapAddressToId(long address)

Specified by:
  `mapAddressToId` in interface `IHprofParserHandler`

#### getSnapshotInfo

    public XSnapshotInfo getSnapshotInfo()

Specified by:
  `getSnapshotInfo` in interface `IHprofParserHandler`

#### getObjectArrayHeapSize

    public long getObjectArrayHeapSize(ClassImpl arrayType,
                                       int size)

Specified by:
  `getObjectArrayHeapSize` in interface `IHprofParserHandler`

#### getPrimitiveArrayHeapSize

    public long getPrimitiveArrayHeapSize(byte elementType,
                                          int size)

Specified by:
  `getPrimitiveArrayHeapSize` in interface `IHprofParserHandler`