Class SyntaxGrader

java.lang.Object
com.spertus.jacquard.common.Grader
com.spertus.jacquard.syntaxgrader.SyntaxGrader
Direct Known Subclasses:
SyntaxCheckGrader, SyntaxCountGrader

public abstract class SyntaxGrader extends Grader
The base class for syntax-based graders that make use of the linked Java parser.
  • Constructor Details

    • SyntaxGrader

      public SyntaxGrader(String name)
      Constructs a syntax-based grader.
      Parameters:
      name - the name
  • Method Details

    • getCallableSingleTarget

      public Callable<List<Result>> getCallableSingleTarget(Target target)
      Description copied from class: Grader
      Gets a Callable through which this grader can be called on a single target.
      Specified by:
      getCallableSingleTarget in class Grader
      Parameters:
      target - the target
      Returns:
      a Callable through which this grader can be called
    • grade

      protected abstract List<Result> grade(com.github.javaparser.ast.CompilationUnit cu)
      Grades the parsed compilation unit.
      Parameters:
      cu - the parsed compilation unit
      Returns:
      the results