Package org.eclipse.mat.snapshot.query
Interface IHeapObjectArgument
-
- All Superinterfaces:
Iterable<int[]>
public interface IHeapObjectArgument extends Iterable<int[]>
An argument of type IHeapObjectArgument can be used to inject heap objects into Query.@Argument public IHeapObjectArgument objects; public IResult execute(IProgressListener listener) throws Exception { for (int[] objectIds : objects) { for (int objectId : objectIds) { // do something } } }
There are two advantages over using primitive Integer arrays: First, the object set is chunked (if accessed through the iterator) and second, there is no need to annotate the variable with isHeapObject = true.
@Argument(isHeapObject = true) public int[] objects;
- No Implement:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]
getIds(IProgressListener listener)
This method returns one (possibly big) integer array with the selected object ids.String
getLabel()
A user-friendly label for the object set.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getIds
int[] getIds(IProgressListener listener) throws SnapshotException
This method returns one (possibly big) integer array with the selected object ids. This method can be much slower than the approach described in the class documentation.- Parameters:
listener
- progress listener- Returns:
- an integer array with the selected object ids
- Throws:
SnapshotException
-
getLabel
String getLabel()
A user-friendly label for the object set.
-
-