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 StringclassesByClassLoaderId(int classLoaderId) Returns an OQL query string to select all classes loaded by the given class loader.static StringclassesByPattern(Pattern pattern, boolean includeSubclasses) Returns all classes matching a given regular expression.static final StringforAddress(long address) Select object by its address.static final StringforObjectId(int objectId) Select object by its object id.static StringforObjectIds(int[] objectIds) Select objects by its ids.static final StringforObjectsOfClass(int classId) All objects of a class identified by its id.static final StringforObjectsOfClass(IClass clasz) All objects of a given class.static StringinstancesByClassLoaderId(int classLoaderId) Returns an OQL query string to select all objects loaded by the given class loader.static StringinstancesByPattern(Pattern pattern, boolean includeSubclasses) Return all instances of classes matching a given regular expression.static StringretainedBy(int objectId) Select the retained set of a given object.static final StringretainedBy(String oqlQuery) Select the retained set of a given OQL query.static voidunion(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
-