org.eclipse.mat.internal.collectionextract
Class HashMapCollectionExtractor

java.lang.Object
  extended by org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
      extended by org.eclipse.mat.internal.collectionextract.HashedMapCollectionExtractorBase
          extended by org.eclipse.mat.internal.collectionextract.HashMapCollectionExtractor
All Implemented Interfaces:
ICollectionExtractor, IMapExtractor
Direct Known Subclasses:
ConcurrentSkipListCollectionExtractor

public class HashMapCollectionExtractor
extends HashedMapCollectionExtractorBase


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.mat.inspections.collectionextract.IMapExtractor
IMapExtractor.EntryObject
 
Constructor Summary
HashMapCollectionExtractor(String sizeField, String arrayField, String keyField, String valueField)
           
 
Method Summary
 IObjectArray extractEntries(IObject coll)
          Extracts the array containing the collection content
 int[] extractEntryIds(IObject coll)
          Returns the object ids (int) for all objects which are contained in the collection
 IObjectArray getBackingArray(IObject coll)
           
 Integer getCapacity(IObject coll)
          Return the capacity of the collection, if applicable
 Integer getNumberOfNotNullElements(IObject collection)
          Returns the number of non-null elements in the collection.
 boolean hasExtractableArray()
          Return true if the collection array based and the array can be extracted from the heap dump
 boolean hasExtractableContents()
          Check if the collection has extractable contents
 
Methods inherited from class org.eclipse.mat.internal.collectionextract.HashedMapCollectionExtractorBase
getCollisionRatio, getFillRatio, getSize, hasCollisionRatio, hasFillRatio, hasSize
 
Methods inherited from class org.eclipse.mat.internal.collectionextract.MapCollectionExtractorBase
extractMapEntries, hasCapacity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMapCollectionExtractor

public HashMapCollectionExtractor(String sizeField,
                                  String arrayField,
                                  String keyField,
                                  String valueField)
Method Detail

hasExtractableContents

public boolean hasExtractableContents()
Description copied from interface: ICollectionExtractor
Check if the collection has extractable contents

Returns:

hasExtractableArray

public boolean hasExtractableArray()
Description copied from interface: ICollectionExtractor
Return true if the collection array based and the array can be extracted from the heap dump

Returns:

extractEntries

public IObjectArray extractEntries(IObject coll)
                            throws SnapshotException
Description copied from interface: ICollectionExtractor
Extracts the array containing the collection content

Returns:
Throws:
SnapshotException

extractEntryIds

public int[] extractEntryIds(IObject coll)
                      throws SnapshotException
Description copied from interface: ICollectionExtractor
Returns the object ids (int) for all objects which are contained in the collection

Returns:
Throws:
SnapshotException

getCapacity

public Integer getCapacity(IObject coll)
                    throws SnapshotException
Description copied from interface: ICollectionExtractor
Return the capacity of the collection, if applicable

Specified by:
getCapacity in interface ICollectionExtractor
Overrides:
getCapacity in class MapCollectionExtractorBase
Returns:
Throws:
SnapshotException

getNumberOfNotNullElements

public Integer getNumberOfNotNullElements(IObject collection)
                                   throws SnapshotException
Description copied from interface: ICollectionExtractor
Returns the number of non-null elements in the collection. Requires hasExtractableContents or hasExtractableArray

Returns:
Throws:
SnapshotException

getBackingArray

public IObjectArray getBackingArray(IObject coll)
                             throws SnapshotException
Throws:
SnapshotException