com.ibm.dtfj.analyzer.util
Class PopulationCounter

java.lang.Object
  extended by com.ibm.dtfj.analyzer.util.PopulationCounter

public class PopulationCounter
extends java.lang.Object

A convenience class designed to simplify various forms of population analysis by looking at the objects contained in an object iterator. By varying the filters applied to the iterator we can produce reports of the resulting populations and build up complex forms of analysis.


Constructor Summary
PopulationCounter(IAnalyzerBase ctx)
          Build an analyzer to count the class populations.
 
Method Summary
 void analyzeAndReport(java.lang.String title, ObjectIterator itr, IAnalysisReport report)
          Analyze the populations of objects from the iterator and then format the result into the given report.
 void buildTables(ObjectIterator it)
          Analyze the object populations in the given iterator.
 int getTotalArrayBytes()
          Return the number of array bytes found in the population.
 int getTotalArrayClasses()
          Return the number of array classes found in the population.
 int getTotalArrayObjects()
          Return the number of array objects found in the population.
 int getTotalObjectBytes()
          Return the number of object bytes found in the population.
 int getTotalObjectClasses()
          Return the number of object classes found in the population.
 int getTotalObjects()
          Return the number of objects found in the population.
 void printReport(java.lang.String title, IAnalysisReport report)
          Build a report detailing the object populations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulationCounter

public PopulationCounter(IAnalyzerBase ctx)
Build an analyzer to count the class populations.

Parameters:
ctx - the context to handle errors
Method Detail

getTotalObjectClasses

public int getTotalObjectClasses()
Return the number of object classes found in the population. buildTables must be executed before this method will return valid results.

Returns:
object classes in the population

getTotalObjects

public int getTotalObjects()
Return the number of objects found in the population. buildTables must be executed before this method will return valid results.

Returns:
objects in the population

getTotalObjectBytes

public int getTotalObjectBytes()
Return the number of object bytes found in the population. buildTables must be executed before this method will return valid results.

Returns:
object bytes in the population

getTotalArrayClasses

public int getTotalArrayClasses()
Return the number of array classes found in the population. buildTables must be executed before this method will return valid results.

Returns:
array classes in the population

getTotalArrayObjects

public int getTotalArrayObjects()
Return the number of array objects found in the population. buildTables must be executed before this method will return valid results.

Returns:
array objects in the population

getTotalArrayBytes

public int getTotalArrayBytes()
Return the number of array bytes found in the population. buildTables must be executed before this method will return valid results.

Returns:
array bytes in the population

buildTables

public void buildTables(ObjectIterator it)
Analyze the object populations in the given iterator.

Parameters:
it - the iterator to be analyzed

printReport

public void printReport(java.lang.String title,
                        IAnalysisReport report)
Build a report detailing the object populations

Parameters:
title - a title for the analysis
report - the report to be given the result

analyzeAndReport

public void analyzeAndReport(java.lang.String title,
                             ObjectIterator itr,
                             IAnalysisReport report)
Analyze the populations of objects from the iterator and then format the result into the given report.

Parameters:
itr - the iterator of objects
title - a title for the analysis
report - the report


© 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.