edu.cmu.cs.crystal
Interface ICrystalAnalysis

All Known Implementing Classes:
AbstractCompilationUnitAnalysis, AbstractCrystalMethodAnalysis, ConstantAnalysis, LiveVariableAnalysis, MayAliasAnalysis, PrintNodesAnalysis, SimpleInstructionVisitor

public interface ICrystalAnalysis

The primary interface to create a Crystal analysis. To create a Crystal plugin, implement this interface (or extend a subtype). Then register the analysis in the plugin.xml file by using the extension-point edu.cmu.cs.crystal.CrystalAnalysis.

Author:
David Dickey, Jonathan Aldrich

Method Summary
 void afterAllCompilationUnits()
          Inform the analysis that all compilation units have been analyzed.
 void beforeAllCompilationUnits()
          Inform the analysis that the analysis process is about to begin.
 IAnalysisInput getInput()
           
 String getName()
           
 IAnalysisReporter getReporter()
           
 void runAnalysis(IAnalysisReporter reporter, IAnalysisInput input, ITypeRoot compUnit, CompilationUnit rootNode)
          Run the analysis!
 

Method Detail

runAnalysis

void runAnalysis(IAnalysisReporter reporter,
                 IAnalysisInput input,
                 ITypeRoot compUnit,
                 CompilationUnit rootNode)
Run the analysis!

Parameters:
reporter - The object that is used to report errors. Output.
input - The input to this analysis.
compUnit - The compilation unit
rootNode - The root ASTNode of the compilation unit

getName

String getName()
Returns:
a unique name for this analysis. This name will be used by Crystal for menu items, error reporting, and otherwise identifying this analysis to the user.

afterAllCompilationUnits

void afterAllCompilationUnits()
Inform the analysis that all compilation units have been analyzed.


beforeAllCompilationUnits

void beforeAllCompilationUnits()
Inform the analysis that the analysis process is about to begin.


getReporter

IAnalysisReporter getReporter()
Returns:
the IAnalysisReporter that is being used for the current run of the analysis, or null if there is not currently an analysis being run.

getInput

IAnalysisInput getInput()
Returns:
the IAnalysisInput that is being used for the current run of the analysis, or null if there is not currently an analysis being run.