org.eclipse.mat.inspections.collections
Class CollectionUtil.Info

java.lang.Object
  extended by org.eclipse.mat.inspections.collections.CollectionUtil.Info
Direct Known Subclasses:
CollectionUtil.IdentityInfo
Enclosing class:
CollectionUtil

public static class CollectionUtil.Info
extends Object


Constructor Summary
CollectionUtil.Info(String className, String sizeField, String arrayField)
           
CollectionUtil.Info(String className, String sizeField, String arrayField, String keyField, String valueField)
           
 
Method Summary
 IObjectArray getBackingArray(IObject collection)
           
 String getBackingArrayField()
           
 int getCapacity(IObject collection)
           
 String getClassName()
           
 ICollectionExtractor getCollectionExtractor()
           
 String getEntryKeyField()
           
 String getEntryValueField()
           
 int getNumberOfNoNullArrayElements(IObject collection)
           
 int getSize(IObject collection)
          Gets the size of the collection First try using the size field Then try using the filled entries in the backing array and the chained entries if it is a map.
 boolean hasBackingArray()
           
 boolean hasSize()
           
 boolean isMap()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionUtil.Info

public CollectionUtil.Info(String className,
                           String sizeField,
                           String arrayField)

CollectionUtil.Info

public CollectionUtil.Info(String className,
                           String sizeField,
                           String arrayField,
                           String keyField,
                           String valueField)
Method Detail

getClassName

public String getClassName()

hasSize

public boolean hasSize()

getSize

public int getSize(IObject collection)
            throws SnapshotException
Gets the size of the collection First try using the size field Then try using the filled entries in the backing array and the chained entries if it is a map.

Parameters:
collection -
Returns:
size of collection or 0 if unknown
Throws:
SnapshotException

hasBackingArray

public boolean hasBackingArray()

getBackingArray

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

getBackingArrayField

public String getBackingArrayField()

isMap

public boolean isMap()

getEntryKeyField

public String getEntryKeyField()

getEntryValueField

public String getEntryValueField()

getCollectionExtractor

public ICollectionExtractor getCollectionExtractor()

getNumberOfNoNullArrayElements

public int getNumberOfNoNullArrayElements(IObject collection)
                                   throws SnapshotException
Throws:
SnapshotException

getCapacity

public int getCapacity(IObject collection)
                throws SnapshotException
Throws:
SnapshotException

toString

public String toString()
Overrides:
toString in class Object