Class FieldSizedCapacityCollectionExtractor
java.lang.Object
org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
org.eclipse.mat.internal.collectionextract.FieldSizeArrayCollectionExtractor
org.eclipse.mat.internal.collectionextract.FieldSizedCapacityCollectionExtractor
- All Implemented Interfaces:
ICollectionExtractor
- Direct Known Subclasses:
FieldSizedCapacityMapExtractor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractEntries
(IObject coll) Extracts the array containing the collection contentint[]
extractEntryIds
(IObject coll) Returns the object ids (int) for all objects which are contained in the collectiongetCapacity
(IObject coll) Return the capacity of the collection, if applicablegetNumberOfNotNullElements
(IObject collection) Returns the number of non-null elements in the collection.boolean
Check if the collection has capacity, e.g.boolean
Return true if the collection array based and the array can be extracted from the heap dumpboolean
Check if the collection has extractable contentsMethods inherited from class org.eclipse.mat.internal.collectionextract.FieldSizeArrayCollectionExtractor
getSize, hasSize
Methods inherited from class org.eclipse.mat.internal.collectionextract.FieldArrayCollectionExtractor
getFillRatio, hasFillRatio
-
Constructor Details
-
FieldSizedCapacityCollectionExtractor
-
-
Method Details
-
hasCapacity
public boolean hasCapacity()Description copied from interface:ICollectionExtractor
Check if the collection has capacity, e.g. ArrayList- Specified by:
hasCapacity
in interfaceICollectionExtractor
- Overrides:
hasCapacity
in classFieldArrayCollectionExtractor
- Returns:
- true if
ICollectionExtractor.getCapacity(IObject)
could be called - See Also:
-
getArray
- Throws:
SnapshotException
-
getCapacity
Description copied from interface:ICollectionExtractor
Return the capacity of the collection, if applicable- Specified by:
getCapacity
in interfaceICollectionExtractor
- Overrides:
getCapacity
in classFieldArrayCollectionExtractor
- Parameters:
coll
- - the collection to find the capacity of- Returns:
- the capacity in bytes, or null if unavailable
- Throws:
SnapshotException
- if there is a problem retrieving data from the snapshot- See Also:
-
hasExtractableContents
public boolean hasExtractableContents()Description copied from interface:ICollectionExtractor
Check if the collection has extractable contents- Specified by:
hasExtractableContents
in interfaceICollectionExtractor
- Overrides:
hasExtractableContents
in classFieldArrayCollectionExtractor
- Returns:
- true if
ICollectionExtractor.extractEntryIds(IObject)
could be called - See Also:
-
extractEntryIds
Description copied from interface:ICollectionExtractor
Returns the object ids (int) for all objects which are contained in the collection- Specified by:
extractEntryIds
in interfaceICollectionExtractor
- Overrides:
extractEntryIds
in classFieldArrayCollectionExtractor
- Parameters:
coll
- - the collection to find the objects it holds- Returns:
- an array of ints which are the object ids.
- Throws:
SnapshotException
- if there is a problem retrieving data from the snapshot- See Also:
-
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- Specified by:
hasExtractableArray
in interfaceICollectionExtractor
- Overrides:
hasExtractableArray
in classFieldArrayCollectionExtractor
- Returns:
- true if
ICollectionExtractor.extractEntries(IObject)
could be called - See Also:
-
extractEntries
Description copied from interface:ICollectionExtractor
Extracts the array containing the collection content- Specified by:
extractEntries
in interfaceICollectionExtractor
- Overrides:
extractEntries
in classFieldArrayCollectionExtractor
- Parameters:
coll
- - the collection to find the object array holding its contents- Returns:
- the backing array for the collection
- Throws:
SnapshotException
- if there is a problem retrieving data from the snapshot- See Also:
-
getNumberOfNotNullElements
Description copied from interface:ICollectionExtractor
Returns the number of non-null elements in the collection. Requires hasExtractableContents or hasExtractableArray- Specified by:
getNumberOfNotNullElements
in interfaceICollectionExtractor
- Overrides:
getNumberOfNotNullElements
in classFieldArrayCollectionExtractor
- Parameters:
collection
- - the collection to find the number of non-null content objects- Returns:
- the number of non-null elements, or null if not available
- Throws:
SnapshotException
- See Also:
-