Properties of heap objects are accessed using a simple dot notation:
[ <alias>. ] <field> . <field>. <field>
An alias can be defined in the FROM Clause to identify the current object, i.e. row in the SQL analogy, on which the OQL statement operates. Without alias, the field is assumed to be one of the fields of the current object. Fields are attributes of the Java objects in the heap dump. Use the Object Inspector to find out about the available fields of an object.
[ <alias>. ] @<attribute> ...
Using the @ symbol, OQL accesses attributes of the underlying Java objects. The attributes are resolved via Bean Introspection. The following table lists some commonly used Java attributes.
Any heap object | IObject | objectId | id of snapshot object |
---|---|---|---|
objectAddress | address of snapshot object | ||
class | class of this object | ||
usedHeapSize | shallow heap size | ||
retainedHeapSize | retained heap size | ||
displayName | display name | ||
Class object | IClass | classLoaderId | id of the class loader |
Any array | IArray | length | length of the array |
[ <alias> . ] @<method>( [ <expression>, <expression> ] ) ...
Adding ( ) forces OQL to interpret this as a Java method call. The call is executed via reflection. Common Java methods.
$snapshot | ISnapshot |
getClasses() |
a collection of all classes |
getClassesByName(String name, boolean includeSubClasses) |
a collection of classes | ||
Class object | IClass |
hasSuperClass() |
result is true if the class has a super class |
isArrayType() |
the result is true if the class is an array type |
<function>( <parameter> )
Build-in functions.
toHex( number ) |
Print the number as hexadecimal |
toString( object ) |
Returns the value of an object, e.g. the content of a String etc. |
dominators( object ) |
The objects immediately dominated by the object |
outbounds( object ) |
outbound referrer |
inbounds( object ) |
inbound referrer |
classof( object ) |
the class of the current object |
dominatorof( object ) |
the immediate dominator, -1 if none |