com.ibm.dtfj.analyzer.helpers
Class ClassInstanceCounter

java.lang.Object
  extended by TranslatableAnalyzer
      extended by com.ibm.dtfj.analyzer.base.AnalyzerBase
          extended by com.ibm.dtfj.analyzer.helpers.ClassInstanceCounter
All Implemented Interfaces:
IAnalyzerBase, IReport

public class ClassInstanceCounter
extends AnalyzerBase
implements IReport

Analyzer to count the number of instances of a given class or list of classes


Constructor Summary
ClassInstanceCounter()
           
 
Method Summary
 int[] countInstances(java.lang.Object heap, java.lang.String[] classes)
          Count the number of instances of the requested classes
 java.lang.String getShortDescription()
          Description of this analyzer
 java.lang.String getVersion()
          (non-Javadoc)
 IAnalysisReport produceReport()
          Produce a report showing the class instance information
 
Methods inherited from class com.ibm.dtfj.analyzer.base.AnalyzerBase
allocateReport, analyzeResponse, buildSafeIterator, buildSortedIterator, defineRule, getCachingPriority, getCategories, getContext, getLongDescription, getName, getResourceBundleName, getState, getStateString, getTotalCorruptDataErrors, getTotalDataUnavailable, getTotalErrors, getTotalNullPointerExceptions, getTotalOtherErrors, getTotalUnexpectedNullExceptions, handleError, handleTypeError, isPrimaryAnalyzer, listRules, logTranslatedMessage, produceReport, setContext, testRules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassInstanceCounter

public ClassInstanceCounter()
Method Detail

getShortDescription

public java.lang.String getShortDescription()
Description of this analyzer

Specified by:
getShortDescription in interface IAnalyzerBase
Specified by:
getShortDescription in class AnalyzerBase
Returns:
- the short description

getVersion

public java.lang.String getVersion()
(non-Javadoc)

Specified by:
getVersion in interface IAnalyzerBase
Overrides:
getVersion in class AnalyzerBase
Returns:
- the version string
See Also:
AnalyzerBase.getVersion()

produceReport

public IAnalysisReport produceReport()
Produce a report showing the class instance information

Specified by:
produceReport in interface IReport
Returns:
- the generic report object which will be given to some formatter

countInstances

public int[] countInstances(java.lang.Object heap,
                            java.lang.String[] classes)
Count the number of instances of the requested classes

Parameters:
heap - - the heap to search
classes - - a string array of the classes
Returns:
- int[] containing the number of instances of each class


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