org.aspectj.org.eclipse.jdt.internal.eval
Class Evaluator

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.eval.Evaluator
Direct Known Subclasses:
CodeSnippetEvaluator, VariablesEvaluator

public abstract class Evaluator
extends java.lang.Object

A evaluator builds a compilation unit and compiles it into class files. If the compilation unit has problems, reports the problems using the requestor.


Method Summary
protected abstract  void addEvaluationResultForCompilationProblem(java.util.Map resultsByIDs, CategorizedProblem problem, char[] cuSource)
          Adds the given problem to the corresponding evaluation result in the given table.
protected  EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result, char[] cuSource)
          Returns the evaluation results that converts the given compilation result that has problems.
protected abstract  char[] getClassName()
          Returns the name of the current class.
protected abstract  char[] getSource()
          Builds and returns the source for the current compilation unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addEvaluationResultForCompilationProblem

protected abstract void addEvaluationResultForCompilationProblem(java.util.Map resultsByIDs,
                                                                 CategorizedProblem problem,
                                                                 char[] cuSource)
Adds the given problem to the corresponding evaluation result in the given table. If the evaluation result doesn't exist yet, adds it in the table. Its evaluation id and evaluation type are computed so that they correspond to the given problem. If it is found to be an internal problem, then the evaluation id of the result is the given compilation unit source.


evaluationResultsForCompilationProblems

protected EvaluationResult[] evaluationResultsForCompilationProblems(CompilationResult result,
                                                                     char[] cuSource)
Returns the evaluation results that converts the given compilation result that has problems. If the compilation result has more than one problem, then the problems are broken down so that each evaluation result has the same evaluation id.


getClassName

protected abstract char[] getClassName()
Returns the name of the current class. This is the simple name of the class. This doesn't include the extension ".java" nor the name of the package.


getSource

protected abstract char[] getSource()
Builds and returns the source for the current compilation unit.