Class ImportDisallowedGrader


public class ImportDisallowedGrader extends ImportForbiddenGrader
Checks whether any imports are found from packages that are not on an explicit allowlist. This is one of several graders involving imports.
See Also:
  • Constructor Details

    • ImportDisallowedGrader

      public ImportDisallowedGrader(String name, double maxPoints, List<String> allowedPackages)
      Creates an import checker that tests whether all imports are within a list of allowed packages.
      Parameters:
      name - the name of this checker
      maxPoints - the number of points to award if none are included
      allowedPackages - allowed package names
    • ImportDisallowedGrader

      public ImportDisallowedGrader(double maxPoints, List<String> allowedPackages)
      Creates an import checker with the default name that tests whether all imports are within a list of allowed packages.
      Parameters:
      maxPoints - the number of points to award if none are included
      allowedPackages - allowed package names