Package de.hsh.graja.core
Class ModuleRunner
java.lang.Object
de.hsh.graja.core.ModuleRunner
- Direct Known Subclasses:
CheckstyleModuleRunner
,CompileModuleRunner
,HumanModuleRunner
,JunitModuleRunner
,PmdModuleRunner
A ModuleRunner executes a module such as JUnit or PMD. It takes a
ModuleRunnerInput
object
as input and creates a ModuleRunnerResult
object as output.
This as an abstract class that must be inherited by concrete implementations.
For a detailed documentation of the role of module runners in the context of the grading process
see javadocs of class Graja
.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ModuleRunner
(ModuleConfiguration moduleCfg) Constructor storesModuleConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionabstract ModuleRunnerResult
run
(ModuleRunnerInput mri, Map<String, ModuleRunnerResult> previousModuleResults) This method executes the module runner.
-
Constructor Details
-
ModuleRunner
Constructor storesModuleConfiguration
- Parameters:
moduleCfg
- the configuration of the module
-
-
Method Details
-
getModuleConfiguration
- Returns:
- the module configuration
-
run
public abstract ModuleRunnerResult run(ModuleRunnerInput mri, Map<String, ModuleRunnerResult> previousModuleResults) This method executes the module runner. It must be implemented by subclasses.- Parameters:
mri
- the input data for the runnerpreviousModuleResults
- output of previous modules serves as input for this module- Returns:
- the result of the module execution
-