Class ImportBlocklistedGrader


public class ImportBlocklistedGrader extends ImportForbiddenGrader
Checks whether imports on a package blocklist are present. This is one of several graders checking imports.
See Also:
  • Constructor Details

    • ImportBlocklistedGrader

      public ImportBlocklistedGrader(String name, double maxPoints, List<String> blocklistedPackages)
      Creates an import grader that tests whether there are any imports involving blocklisted (forbidden) packages.
      Parameters:
      name - the name of this checker
      maxPoints - the number of points to award if none are included
      blocklistedPackages - blocklisted package names
    • ImportBlocklistedGrader

      public ImportBlocklistedGrader(double maxPoints, List<String> blocklistedPackages)
      Creates an import grader with a default name that tests whether there are any imports involving blocklisted (forbidden) packages.
      Parameters:
      maxPoints - the number of points to award if none are included
      blocklistedPackages - blocklisted package names