Class ImportForbiddenGrader
java.lang.Object
com.spertus.jacquard.common.Grader
com.spertus.jacquard.syntaxgrader.SyntaxGrader
com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
com.spertus.jacquard.syntaxgrader.ImportForbiddenGrader
- Direct Known Subclasses:
 ImportBlocklistedGrader,ImportDisallowedGrader
Abstract superclass of graders that check whether there are any imports
 of packages that are not allowed.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAbstract superclass of adapters testing whether forbidden imports appear. - 
Field Summary
Fields inherited from class com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
adapter, maxScorePerInstance - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImportForbiddenGrader(String name, double maxScore) Creates an import grader that tests whether there are any imports involving blocklisted (forbidden) packages. - 
Method Summary
Modifier and TypeMethodDescriptionvoidfinalizeResults(List<Result> results) Adds any results that cannot be computed until all visits are complete.voidPerforms any setup before a call toSyntaxCheckGrader.grade(CompilationUnit).Methods inherited from class com.spertus.jacquard.syntaxgrader.SyntaxCheckGrader
grade, makeFailingResult, makeSuccessResultMethods inherited from class com.spertus.jacquard.syntaxgrader.SyntaxGrader
getCallableSingleTargetMethods inherited from class com.spertus.jacquard.common.Grader
getCallableMultiTarget, grade, grade, gradeAll, makeExceptionResult, makeExceptionResultList, makeFailureResult, makeFailureResultList, makePartialCreditResult, makeSuccessResult, makeSuccessResultList 
- 
Constructor Details
- 
ImportForbiddenGrader
Creates an import grader that tests whether there are any imports involving blocklisted (forbidden) packages.- Parameters:
 name- the name of this checkermaxScore- the number of points to award if none are included
 
 - 
 - 
Method Details
- 
initialize
public void initialize()Description copied from class:SyntaxCheckGraderPerforms any setup before a call toSyntaxCheckGrader.grade(CompilationUnit).- Overrides:
 initializein classSyntaxCheckGrader
 - 
finalizeResults
Description copied from class:SyntaxCheckGraderAdds any results that cannot be computed until all visits are complete.- Overrides:
 finalizeResultsin classSyntaxCheckGrader- Parameters:
 results- the list of results, which may be mutated by this call
 
 -