edu.cmu.cs.crystal
Interface IAnalysisReporter

All Known Implementing Classes:
StandardAnalysisReporter

public interface IAnalysisReporter

An interface that analyses use for reporting problems. Crystal will create an instance of this interface and provide it to analyses for reporting errors that they find.

Author:
Nels E. Beckman

Nested Class Summary
static class IAnalysisReporter.SEVERITY
          The severity of a user problem being reported.
 
Method Summary
 void clearMarkersForCompUnit(ITypeRoot compUnit)
          For the given compilation unit, clear all the user problems which were reported, if necessary.
 PrintWriter debugOut()
           
 void reportUserProblem(String problemDescription, ASTNode node, String analysisName)
          Indicate that the running of this analysis on this compilation unit has created a problem.
 void reportUserProblem(String problemDescription, ASTNode node, String analysisName, IAnalysisReporter.SEVERITY severity)
          Indicate that the running of this analysis on this compilation unit has created a problem.
 PrintWriter userOut()
           
 

Method Detail

reportUserProblem

void reportUserProblem(String problemDescription,
                       ASTNode node,
                       String analysisName)
Indicate that the running of this analysis on this compilation unit has created a problem. By default, this will have a severity level of "INFO".

Parameters:
problemDescription - A textual description of the problem.
node - The AST node where the problem was encountered.
analysisName - The name of the Crystal analysis that is reporting the problem.

reportUserProblem

void reportUserProblem(String problemDescription,
                       ASTNode node,
                       String analysisName,
                       IAnalysisReporter.SEVERITY severity)
Indicate that the running of this analysis on this compilation unit has created a problem.

Parameters:
problemDescription - A textual description of the problem.
node - The AST node where the problem was encountered.
analysisName - The name of the Crystal analysis that is reporting the problem.
severity - The severity level of this problem

debugOut

PrintWriter debugOut()

userOut

PrintWriter userOut()

clearMarkersForCompUnit

void clearMarkersForCompUnit(ITypeRoot compUnit)
For the given compilation unit, clear all the user problems which were reported, if necessary. Implementers are free to implement this method as necessary, including by doing nothing at all.