Eclipse Memory Analyzer - OQL to flatten reference array object

Object Query Language

Object Query Language is an SQL like language used by Memory Analyzer for exploring a heap dump. 

You can reference the help page for more detail 

https://wiki.eclipse.org/MemoryAnalyzer/OQL

My interest is to flatten a object array.

Taking String[] as example, if you perform "Select *", it will returns each array as tree



After experiment a little, you could flatten the first level tree with OBJECTS keyword and @referenceArray keyword. 


But my ultimate interest is the inner object/value


What you could do is - Use the previous query as sub-select query and access the inner "elements" with dot notation. For my example, I could only access 1 level, which is elem.value (basically, the value of the String array). You could access inner object with multiple dot notation




Comments

Popular Posts