org.eclipse.mat.inspections.collections
Class CollectionUtil.Info
java.lang.Object
org.eclipse.mat.inspections.collections.CollectionUtil.Info
- Enclosing class:
- CollectionUtil
public static class CollectionUtil.Info
- extends Object
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)
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