org.eclipse.mat.query
Class ContextProvider

java.lang.Object
  extended by org.eclipse.mat.query.ContextProvider

public abstract class ContextProvider
extends java.lang.Object

Base class for context provider which is an object which returns the heap objects represented by an arbitrary row in a table/tree.

See Also:
IContextObject, IContextObjectSet

Constructor Summary
ContextProvider(ContextProvider template)
          Constructor using copying values from the give template context provider.
ContextProvider(java.lang.String label)
           
ContextProvider(java.lang.String label, ContextDerivedData.DerivedOperation... operations)
           
 
Method Summary
abstract  IContextObject getContext(java.lang.Object row)
          Return the context object associated with the specified row.
 java.lang.String getLabel()
          The label for this context provider
 ContextDerivedData.DerivedOperation[] getOperations()
           
 boolean hasSameTarget(ContextProvider other)
           
 boolean isDefault()
          The default context provider is that for the whole snapshot.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextProvider

public ContextProvider(java.lang.String label)
Parameters:
label - The label used for context menus.

ContextProvider

public ContextProvider(java.lang.String label,
                       ContextDerivedData.DerivedOperation... operations)

ContextProvider

public ContextProvider(ContextProvider template)
Constructor using copying values from the give template context provider.

Method Detail

getLabel

public java.lang.String getLabel()
The label for this context provider

Returns:
the label

isDefault

public final boolean isDefault()
The default context provider is that for the whole snapshot.

Returns:
true if it represents the whole snapshot

hasSameTarget

public final boolean hasSameTarget(ContextProvider other)

getOperations

public ContextDerivedData.DerivedOperation[] getOperations()

getContext

public abstract IContextObject getContext(java.lang.Object row)
Return the context object associated with the specified row.

Parameters:
row - the row requested
Returns:
details of the row