Class FieldSizeArrayCollectionExtractor
- java.lang.Object
-
- org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
-
- org.eclipse.mat.internal.collectionextract.FieldSizeArrayCollectionExtractor
-
- All Implemented Interfaces:
ICollectionExtractor
- Direct Known Subclasses:
ArrayListSubListCollectionExtractor,FieldSizeArrayMapExtractor,FieldSizedCapacityCollectionExtractor,IdentityHashMapCollectionExtractor,RegularEnumSetExtractor
public class FieldSizeArrayCollectionExtractor extends FieldArrayCollectionExtractor
-
-
Constructor Summary
Constructors Constructor Description FieldSizeArrayCollectionExtractor(java.lang.String sizeField, java.lang.String arrayField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetSize(IObject coll)Extract the size of the collection.booleanhasSize()Check if the size of the collection can be extracted.-
Methods inherited from class org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
extractEntries, extractEntryIds, getCapacity, getFillRatio, getNumberOfNotNullElements, hasCapacity, hasExtractableArray, hasExtractableContents, hasFillRatio
-
-
-
-
Method Detail
-
hasSize
public boolean hasSize()
Description copied from interface:ICollectionExtractorCheck if the size of the collection can be extracted.- Specified by:
hasSizein interfaceICollectionExtractor- Overrides:
hasSizein classFieldArrayCollectionExtractor- Returns:
- true if
ICollectionExtractor.getSize(IObject)could be called - See Also:
ICollectionExtractor.getSize(IObject)
-
getSize
public java.lang.Integer getSize(IObject coll) throws SnapshotException
Description copied from interface:ICollectionExtractorExtract the size of the collection.- Specified by:
getSizein interfaceICollectionExtractor- Overrides:
getSizein classFieldArrayCollectionExtractor- Parameters:
coll- - the collection to find the size of- Returns:
- the size, or null if not available
- Throws:
SnapshotException- if there is a problem retrieving data from the snapshot- See Also:
ICollectionExtractor.hasSize()
-
-