Class ImportRequiredGrader


public class ImportRequiredGrader extends SyntaxCheckGrader
Checks whether required imports appear in a submission. This is one of several graders checking imports.
See Also:
  • Constructor Details

    • ImportRequiredGrader

      public ImportRequiredGrader(String name, double pointsPerImport, List<String> requiredImports)
      Creates an import checker that awards points per required import that is found. Required imports may end with asterisks but must not end with semicolons. For example, legal values include "java.util.*" and "java.io.IOException".
      Parameters:
      name - the name of this checker
      pointsPerImport - the number of points per required import
      requiredImports - required imports
      Throws:
      ClientException - if requiredImports is empty or has malformed entries
    • ImportRequiredGrader

      public ImportRequiredGrader(double pointsPerImport, List<String> requiredImports)
      Creates an import checker with the default name that awards points per required import that is found. Required imports may end with asterisks but must not end with semicolons. For example, legal values include "java.util.*" and "java.io.IOException".
      Parameters:
      pointsPerImport - the number of points per required import
      requiredImports - required imports
      Throws:
      ClientException - if requiredImports is empty or has malformed entries
  • Method Details