org.eclipse.mat.ui.internal.acquire
Class ProviderContextImpl

java.lang.Object
  extended by org.eclipse.mat.query.registry.QueryContextImpl
      extended by org.eclipse.mat.ui.internal.acquire.ProviderContextImpl
All Implemented Interfaces:
IQueryContext

public class ProviderContextImpl
extends QueryContextImpl


Constructor Summary
ProviderContextImpl()
           
 
Method Summary
 ContextDerivedData getContextDerivedData()
          For example, retained size derived data.
 File getPrimaryFile()
          The main file for the snapshot
 String mapToExternalIdentifier(int objectId)
          Map an id to a readable form.
 int mapToObjectId(String externalIdentifier)
          Map readable form to internal id.
 Object parse(Class<?> type, Argument.Advice advice, String[] args, ParsePosition pos)
          Consume the special data.
 boolean parses(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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderContextImpl

public ProviderContextImpl()
Method Detail

getContextDerivedData

public ContextDerivedData getContextDerivedData()
Description copied from interface: IQueryContext
For example, retained size derived data.

Returns:
the derived data

getPrimaryFile

public File getPrimaryFile()
Description copied from interface: IQueryContext
The main file for the snapshot

Returns:
the dump

mapToExternalIdentifier

public String mapToExternalIdentifier(int objectId)
                               throws SnapshotException
Description copied from interface: IQueryContext
Map an id to a readable form. Reverse of IQueryContext.mapToObjectId(java.lang.String)

Returns:
readable external version
Throws:
SnapshotException
See Also:
IQueryContext.mapToObjectId(java.lang.String)

mapToObjectId

public int mapToObjectId(String externalIdentifier)
                  throws SnapshotException
Description copied from interface: IQueryContext
Map readable form to internal id. Reverse of IQueryContext.mapToExternalIdentifier(int)

Returns:
the object id
Throws:
SnapshotException

parse

public Object parse(Class<?> type,
                    Argument.Advice advice,
                    String[] args,
                    ParsePosition pos)
             throws SnapshotException
Description copied from interface: IQueryContext
Consume the special data. For example using the ArgumentParser for data from a query wizard.

Returns:
the result of parsing the data suitable given the type and advice
Throws:
SnapshotException

parses

public boolean parses(Class<?> type,
                      Argument.Advice advice)
Description copied from interface: IQueryContext
Is special parsing required to get an object of the required type?

Returns:
true if parsing is needed.