com.ibm.dtfj.analyzer.helpers
Class OneImage

java.lang.Object
  extended by TranslatableAnalyzer
      extended by com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
          extended by com.ibm.dtfj.analyzer.helpers.OneImage
All Implemented Interfaces:
IAnalyzerBase, IReport, IWrapper
Direct Known Subclasses:
OneImage

public class OneImage
extends SimpleAnalyzerBean

Print and extract basic information about one DTFJ Image
Count and navigate through multiple AddressSpaces, Processes, Runtimes within the Image.


Constructor Summary
OneImage()
          Null constructor for use as JavaBean
 
Method Summary
 com.ibm.dtfj.image.ImageAddressSpace getAddressSpace(int targetAddressSpace)
          Obtain the ImageAddressSpace object associated with a specific index in the Image.
static OneImage getInstance(IAnalyzerContext context, com.ibm.dtfj.image.Image parent)
          Find the OneImage bean instance associated with a given parent Image (create it if necessary)
 int getNumAddressSpaces()
           
 int getNumProcesses()
           
 int getNumProcesses(int targetAddressSpace)
          Find the number of Processes within a given AddressSpace.
 int getNumRuntimes()
           
 int getNumRuntimes(int targetAddressSpace, int targetProcess)
          Find the number of Runtimes within a given (AddressSpace,Process) pair.
 com.ibm.dtfj.image.ImageProcess getProcess(int targetAddressSpace, int targetProcess)
          Obtain the ImageProcess object associated with a specific set of (ImageAddressSpace, ImageProcess) in the Image.
 com.ibm.dtfj.runtime.ManagedRuntime getRuntime(int targetAddressSpace, int targetProcess, int targetRuntime)
          Obtain the Runtime object associated with a specific set of (ImageAddressSpace, ImageProcess, ManagedRuntime) in the Image.
protected  void printCommon(IAnalysisReport out)
          Print the general information about this Image, available in all versions of the DTFJ API, as a segment of a report
protected  void printRuntimes(IAnalysisReport out)
          Print information about the runtimes contained in this Image, as a segment of a report
 IAnalysisReport produceReport()
          Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.
 void scanAllRuntimes()
          Scan through all the addressspaces/processes/runtimes in this image to initialize the counts of each type of object and enable subsequent calls to createSpecificContext(), createSingleContext and getAllContexts().
 void setParent(java.lang.Object parent)
          Set the parent Image underlying this analyzer bean.
 
Methods inherited from class com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
allocateReport, allocateReportOptions, allocateSecondaryReport, getCachingPriority, getCategories, getContext, getIdentityString, getInstance, getLogger, getLongDescription, getName, getNextValidObject, getParent, getReportExtensionHelper, getResourceBundleName, getShortDescription, getVersion, isPrimaryAnalyzer, printEmbeddedReport, printEmbeddedReport, printEmbeddedReportWithOptions, printEmbeddedReportWithOptions, printReportInfoHeader, recordInternalExceptionStatic, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneImage

public OneImage()
Null constructor for use as JavaBean

Method Detail

getInstance

public static OneImage getInstance(IAnalyzerContext context,
                                   com.ibm.dtfj.image.Image parent)
Find the OneImage bean instance associated with a given parent Image (create it if necessary)

Parameters:
context - the AnalyzerContext in which to locate this bean instance
parent - the parent Image underlying this analyzer bean
Returns:
the desired OneImage analyzer bean

setParent

public void setParent(java.lang.Object parent)
Set the parent Image underlying this analyzer bean.

Specified by:
setParent in interface IWrapper
Overrides:
setParent in class SimpleAnalyzerBean
Parameters:
parent - The parent object to set. Must be of type Image. compatible with the type of analyzer bean that receives it
See Also:
IWrapper.setParent(java.lang.Object)

getNumAddressSpaces

public int getNumAddressSpaces()
Returns:
Returns the total number of AddressSpaces in this Image.

getAddressSpace

public com.ibm.dtfj.image.ImageAddressSpace getAddressSpace(int targetAddressSpace)
Obtain the ImageAddressSpace object associated with a specific index in the Image.

Parameters:
targetAddressSpace - index of the desired ImageAddressSpace (0..n-1)
Returns:
the desired ImageAddressSpace object

getNumProcesses

public int getNumProcesses()
Returns:
Returns the total number of Processes in this Image.

getNumProcesses

public int getNumProcesses(int targetAddressSpace)
Find the number of Processes within a given AddressSpace.

Parameters:
targetAddressSpace - index of the desired ImageAddressSpace (1..n)
Returns:
the number of Processes in the given AddressSpace

getProcess

public com.ibm.dtfj.image.ImageProcess getProcess(int targetAddressSpace,
                                                  int targetProcess)
Obtain the ImageProcess object associated with a specific set of (ImageAddressSpace, ImageProcess) in the Image.

Parameters:
targetAddressSpace - index of the desired ImageAddressSpace (0..n-1)
targetProcess - index of the desired ImageProcess (0..n-1)
Returns:
the desired ImageProcess object

getNumRuntimes

public int getNumRuntimes()
Returns:
Returns the total number of Runtimes in this Image.

getNumRuntimes

public int getNumRuntimes(int targetAddressSpace,
                          int targetProcess)
Find the number of Runtimes within a given (AddressSpace,Process) pair.

Parameters:
targetAddressSpace - index of the desired ImageAddressSpace (1..n)
targetProcess - index of the desired ImageProcess (1..n)
Returns:
the number of Processes in the given (AddressSpace,Process) pair

getRuntime

public com.ibm.dtfj.runtime.ManagedRuntime getRuntime(int targetAddressSpace,
                                                      int targetProcess,
                                                      int targetRuntime)
Obtain the Runtime object associated with a specific set of (ImageAddressSpace, ImageProcess, ManagedRuntime) in the Image.

Parameters:
targetAddressSpace - index of the desired ImageAddressSpace (0..n-1)
targetProcess - index of the desired ImageProcess (0..n-1)
targetRuntime - index of the desired ManagedRuntime (0..n-1)
Returns:
the desired ManagedRuntime object

scanAllRuntimes

public void scanAllRuntimes()
Scan through all the addressspaces/processes/runtimes in this image to initialize the counts of each type of object and enable subsequent calls to createSpecificContext(), createSingleContext and getAllContexts(). or null if warnings should be suppressed.


produceReport

public IAnalysisReport produceReport()
Description copied from interface: IReport
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.

Specified by:
produceReport in interface IReport
Overrides:
produceReport in class SimpleAnalyzerBean
Returns:
- the generic report object which will be given to some formatter
See Also:
IReport.produceReport()

printCommon

protected void printCommon(IAnalysisReport out)
Print the general information about this Image, available in all versions of the DTFJ API, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output

printRuntimes

protected void printRuntimes(IAnalysisReport out)
Print information about the runtimes contained in this Image, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.