Package org.eclipse.mat.snapshot
Class OQL
java.lang.Object
org.eclipse.mat.snapshot.OQL
Factory for often-used OQL queries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
classesByClassLoaderId
(int classLoaderId) Returns an OQL query string to select all classes loaded by the given class loader.static String
classesByPattern
(Pattern pattern, boolean includeSubclasses) Returns all classes matching a given regular expression.static final String
forAddress
(long address) Select object by its address.static final String
forObjectId
(int objectId) Select object by its object id.static String
forObjectIds
(int[] objectIds) Select objects by its ids.static final String
forObjectsOfClass
(int classId) All objects of a class identified by its id.static final String
forObjectsOfClass
(IClass clasz) All objects of a given class.static String
instancesByClassLoaderId
(int classLoaderId) Returns an OQL query string to select all objects loaded by the given class loader.static String
instancesByPattern
(Pattern pattern, boolean includeSubclasses) Return all instances of classes matching a given regular expression.static String
retainedBy
(int objectId) Select the retained set of a given object.static final String
retainedBy
(String oqlQuery) Select the retained set of a given OQL query.static void
union
(StringBuilder query, String other) Create a OQL union statement and append it to the query.
-
Method Details
-
forAddress
Select object by its address. -
forObjectId
Select object by its object id. -
forObjectIds
Select objects by its ids. -
retainedBy
Select the retained set of a given OQL query. -
retainedBy
Select the retained set of a given object. -
forObjectsOfClass
All objects of a given class. -
forObjectsOfClass
All objects of a class identified by its id. -
union
Create a OQL union statement and append it to the query. Possibly optimize a common prefix. select s.a,s.b,s.c from 1,173 s select s.a,s.b,s.c from 123 s combine to select s.a,s.b,s.c from 1,173,123 s Also split off UNION clauses to see if the new clause can be merged into an existing UNION clause. -
instancesByPattern
Return all instances of classes matching a given regular expression. -
classesByPattern
Returns all classes matching a given regular expression. -
instancesByClassLoaderId
Returns an OQL query string to select all objects loaded by the given class loader.select * from ( select * from java.lang.Class c where c implements org.eclipse.mat.snapshot.model.IClass and c.@classLoaderId = {0} )
- Parameters:
classLoaderId
- the object id of the class loader- Returns:
- an OQL query selecting all objects loaded by the class loader
-
classesByClassLoaderId
Returns an OQL query string to select all classes loaded by the given class loader.select * from java.lang.Class c where c implements org.eclipse.mat.snapshot.model.IClass and c.@classLoaderId = {0}
- Parameters:
classLoaderId
- the object id of the class loader- Returns:
- an OQL query selecting all classes loaded by the class loader
-