public class SnapshotQuery extends Object
NOTE: The queries delivered with Memory Analyzer and their expected parameters are not part of the API. Both names/identifiers and parameters may change.
Usage example:IResult result = SnapshotQuery.lookup("top_consumers_html", snapshot) // .setArgument("objects", retained) // .execute(listener);
Modifier and Type | Method and Description |
---|---|
IResult |
execute(IProgressListener listener)
Execute the query and return the result.
|
List<? extends IArgumentDescriptor> |
getArguments()
Get the list of the query arguments.
|
IAnnotatedObjectDescriptor |
getDescriptor()
Get a descriptor for the query.
|
static SnapshotQuery |
lookup(String name,
ISnapshot snapshot)
Factory method to create a query by name.
|
static SnapshotQuery |
parse(String commandLine,
ISnapshot snapshot)
Factory method to create a query by command line, i.e.
|
RefinedResultBuilder |
refine(IProgressListener listener)
Execute the query and return a
RefinedResultBuilder which allows
for filtering, sorting and limiting of the result. |
SnapshotQuery |
set(String name,
Object value)
Deprecated.
use setArgument() instead
|
SnapshotQuery |
setArgument(String name,
Object value)
Set the argument identified by
name . |
public static SnapshotQuery lookup(String name, ISnapshot snapshot) throws SnapshotException
SnapshotException
public static SnapshotQuery parse(String commandLine, ISnapshot snapshot) throws SnapshotException
SnapshotException
public IAnnotatedObjectDescriptor getDescriptor()
IAnnotatedObjectDescriptor
a descriptor for the querypublic List<? extends IArgumentDescriptor> getArguments()
IArgumentDescriptor
describing the arguments which the query expectspublic SnapshotQuery setArgument(String name, Object value) throws SnapshotException
name
. Heap objects can be
provided as int
, Integer
, int[]
or
IObject
.name
- the name of the argumentvalue
- the new value of the argumentSnapshotException
public SnapshotQuery set(String name, Object value) throws SnapshotException
SnapshotException
public IResult execute(IProgressListener listener) throws SnapshotException
SnapshotException
public RefinedResultBuilder refine(IProgressListener listener) throws SnapshotException
RefinedResultBuilder
which allows
for filtering, sorting and limiting of the result.SnapshotException