Class ImportBlocklistedGrader
java.lang.Object
com.spertus.jacquard.common.Grader
com.spertus.jacquard.syntaxgrader.SyntaxGrader
com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
com.spertus.jacquard.syntaxgrader.ImportForbiddenGrader
com.spertus.jacquard.syntaxgrader.ImportBlocklistedGrader
Checks whether imports on a package blocklist are present. This is
one of several graders checking imports.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.spertus.jacquard.syntaxgrader.ImportForbiddenGrader
ImportForbiddenGrader.ImportCheckerAdapter
-
Field Summary
Fields inherited from class com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
adapter, maxScorePerInstance
-
Constructor Summary
ConstructorDescriptionImportBlocklistedGrader
(double maxPoints, List<String> blocklistedPackages) Creates an import grader with a default name that tests whether there are any imports involving blocklisted (forbidden) packages.ImportBlocklistedGrader
(String name, double maxPoints, List<String> blocklistedPackages) Creates an import grader that tests whether there are any imports involving blocklisted (forbidden) packages. -
Method Summary
Methods inherited from class com.spertus.jacquard.syntaxgrader.ImportForbiddenGrader
finalizeResults, initialize
Methods inherited from class com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
grade, makeFailingResult, makeSuccessResult
Methods inherited from class com.spertus.jacquard.syntaxgrader.SyntaxGrader
getCallableSingleTarget
Methods inherited from class com.spertus.jacquard.common.Grader
getCallableMultiTarget, grade, grade, gradeAll, makeExceptionResult, makeExceptionResultList, makeFailureResult, makeFailureResultList, makePartialCreditResult, makeSuccessResult, makeSuccessResultList
-
Constructor Details
-
ImportBlocklistedGrader
Creates an import grader that tests whether there are any imports involving blocklisted (forbidden) packages.- Parameters:
name
- the name of this checkermaxPoints
- the number of points to award if none are includedblocklistedPackages
- blocklisted package names
-
ImportBlocklistedGrader
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 includedblocklistedPackages
- blocklisted package names
-