Class ProviderContextImpl
- java.lang.Object
-
- org.eclipse.mat.query.registry.QueryContextImpl
-
- org.eclipse.mat.ui.internal.acquire.ProviderContextImpl
-
- All Implemented Interfaces:
IQueryContext
public class ProviderContextImpl extends QueryContextImpl
-
-
Constructor Summary
Constructors Constructor Description ProviderContextImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextDerivedDatagetContextDerivedData()For example, retained size derived data.StringgetPrefix()The prefix for files generated from snapshotFilegetPrimaryFile()The main file for the snapshotStringmapToExternalIdentifier(int objectId)Map an id to a readable form.intmapToObjectId(String externalIdentifier)Map readable form to internal id.Objectparse(Class<?> type, Argument.Advice advice, String[] args, ParsePosition pos)Consume the special data.booleanparses(Class<?> type, Argument.Advice advice)Is special parsing required to get an object of the required type?-
Methods inherited from class org.eclipse.mat.query.registry.QueryContextImpl
available, converts, convertToString, convertToValue, get
-
-
-
-
Method Detail
-
getContextDerivedData
public ContextDerivedData getContextDerivedData()
Description copied from interface:IQueryContextFor example, retained size derived data.- Returns:
- the derived data
-
getPrimaryFile
public File getPrimaryFile()
Description copied from interface:IQueryContextThe main file for the snapshot- Returns:
- the dump
-
getPrefix
public String getPrefix()
Description copied from interface:IQueryContextThe prefix for files generated from snapshot- Returns:
- the prefix
-
mapToExternalIdentifier
public String mapToExternalIdentifier(int objectId) throws SnapshotException
Description copied from interface:IQueryContextMap an id to a readable form. For example the hex-address with 0x as a prefix. Reverse ofIQueryContext.mapToObjectId(java.lang.String)- Parameters:
objectId- The 0-based internal identifier used within MAT.- Returns:
- readable external version
- Throws:
SnapshotException- if the objectId does not match to a valid object.- See Also:
IQueryContext.mapToObjectId(java.lang.String)
-
mapToObjectId
public int mapToObjectId(String externalIdentifier) throws SnapshotException
Description copied from interface:IQueryContextMap readable form to internal id. Reverse ofIQueryContext.mapToExternalIdentifier(int).- Parameters:
externalIdentifier- as provided byIQueryContext.mapToExternalIdentifier(int).- Returns:
- the object id
- Throws:
SnapshotException- if the external identifier does not match a known object in the snapshot.
-
parse
public Object parse(Class<?> type, Argument.Advice advice, String[] args, ParsePosition pos) throws SnapshotException
Description copied from interface:IQueryContextConsume the special data. For example using the ArgumentParser for data from a query wizard.- Parameters:
type- The Java type of the destination argument.advice- Further details about the argument.args- The source to be convertedpos- Used to index through the array of Strings.- Returns:
- the result of parsing the data suitable given the type and advice
- Throws:
SnapshotException- If there is a problem in the parsing.
-
parses
public boolean parses(Class<?> type, Argument.Advice advice)
Description copied from interface:IQueryContextIs special parsing required to get an object of the required type?- Parameters:
type- The Java type of the argument.advice- Further details about the argument.- Returns:
- true if special parsing is needed, for example for a heap object or class object in the heap.
-
-