Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mat-dev] Reworked collection extraction API (bug 442219)

Hi,

I've finally gotten back to working on the Java EE queries I was doing 9
months ago. As part of that, I need to process java collections
internally within my queries, so started work on moving the logic from
the collections-related queries to some proper API that is usable from
queries.

I've just pushed my prototype API into gerrit at
https://git.eclipse.org/r/#/c/47117/. Although the diff is very large, a
lot of it is moving code around to split up the monolithic classes,
making the existing queries use the new API, and adding support for a
few new collection classes.


The API itself is the six classes under
org.eclipse.mat.inspections.collectionextract.
CollectionExtractor/MapExtractor are the SPI interfaces which know how
to get information out of specific implementation classes.

CollectionExtractionUtils is the initial entry point, usually used by
giving it the IObject for the collection you want to look at.
ExtractedCollection/ExtractedMap are conveniences which bind an
IObject/extractor pair together, and let use them in Java for-each loops
and similar niceties.


I know that I need to add more documentation, and this large a change
would obviously need a lot of testing, but I was wondering if people
could take a look at the API/implementation and see what you think.
Trying to break it on the collections in your heap dumps would also be
useful.

-- 
James "Doc" Livingston <jlivings@xxxxxxxxxx>
JBoss Support Engineering Group




Back to the top